28 Oct, 2010

16 commits

  • In /proc/stat, the number of per-IRQ event is shown by making a sum each
    irq's events on all cpus. But we can make use of kstat_irqs().

    kstat_irqs() do the same calculation, If !CONFIG_GENERIC_HARDIRQ,
    it's not a big cost. (Both of the number of cpus and irqs are small.)

    If a system is very big and CONFIG_GENERIC_HARDIRQ, it does

    for_each_irq()
    for_each_cpu()
    - look up a radix tree
    - read desc->irq_stat[cpu]
    This seems not efficient. This patch adds kstat_irqs() for
    CONFIG_GENRIC_HARDIRQ and change the calculation as

    for_each_irq()
    look up radix tree
    for_each_cpu()
    - read desc->irq_stat[cpu]

    This reduces cost.

    A test on (4096cpusp, 256 nodes, 4592 irqs) host (by Jack Steiner)

    %time cat /proc/stat > /dev/null

    Before Patch: 2.459 sec
    After Patch : .561 sec

    [akpm@linux-foundation.org: unexport kstat_irqs, coding-style tweaks]
    [akpm@linux-foundation.org: fix unused variable 'per_irq_sum']
    Signed-off-by: KAMEZAWA Hiroyuki
    Tested-by: Jack Steiner
    Acked-by: Jack Steiner
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • /proc/stat shows the total number of all interrupts to each cpu. But when
    the number of IRQs are very large, it take very long time and 'cat
    /proc/stat' takes more than 10 secs. This is because sum of all irq
    events are counted when /proc/stat is read. This patch adds "sum of all
    irq" counter percpu and reduce read costs.

    The cost of reading /proc/stat is important because it's used by major
    applications as 'top', 'ps', 'w', etc....

    A test on a mechin (4096cpu, 256 nodes, 4592 irqs) shows

    %time cat /proc/stat > /dev/null
    Before Patch: 12.627 sec
    After Patch: 2.459 sec

    Signed-off-by: KAMEZAWA Hiroyuki
    Tested-by: Jack Steiner
    Acked-by: Jack Steiner
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Oleg Nesterov pointed out we have to prevent multiple-threads-inside-exec
    itself and we can reuse ->cred_guard_mutex for it. Yes, concurrent
    execve() has no worth.

    Let's move ->cred_guard_mutex from task_struct to signal_struct. It
    naturally prevent multiple-threads-inside-exec.

    Signed-off-by: KOSAKI Motohiro
    Reviewed-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • lock_task_sighand() grabs sighand->siglock in case of returning non-NULL
    but unlock_task_sighand() releases it unconditionally. This leads sparse
    to complain about the lock context imbalance. Rename and wrap
    lock_task_sighand() using __cond_lock() macro to make sparse happy.

    Suggested-by: Eric Dumazet
    Signed-off-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • Fix up the arguments to arch_ptrace() to take account of the fact that
    @addr and @data are now unsigned long rather than long as of a preceding
    patch in this series.

    Signed-off-by: Namhyung Kim
    Cc:
    Acked-by: Roland McGrath
    Acked-by: David Howells
    Acked-by: Geert Uytterhoeven
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • Since userspace API of ptrace syscall defines @addr and @data as void
    pointers, it would be more appropriate to define them as unsigned long in
    kernel. Therefore related functions are changed also.

    'unsigned long' is typically used in other places in kernel as an opaque
    data type and that using this helps cleaning up a lot of warnings from
    sparse.

    Suggested-by: Arnd Bergmann
    Signed-off-by: Namhyung Kim
    Acked-by: Arnd Bergmann
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • The ns_cgroup is a control group interacting with the namespaces. When a
    new namespace is created, a corresponding cgroup is automatically created
    too. The cgroup name is the pid of the process who did 'unshare' or the
    child of 'clone'.

    This cgroup is tied with the namespace because it prevents a process to
    escape the control group and use the post_clone callback, so the child
    cgroup inherits the values of the parent cgroup.

    Unfortunately, the more we use this cgroup and the more we are facing
    problems with it:

    (1) when a process unshares, the cgroup name may conflict with a
    previous cgroup with the same pid, so unshare or clone return -EEXIST

    (2) the cgroup creation is out of control because there may have an
    application creating several namespaces where the system will
    automatically create several cgroups in his back and let them on the
    cgroupfs (eg. a vrf based on the network namespace).

    (3) the mix of (1) and (2) force an administrator to regularly check
    and clean these cgroups.

    This patchset removes the ns_cgroup by adding a new flag to the cgroup and
    the cgroupfs mount option. It enables the copy of the parent cgroup when
    a child cgroup is created. We can then safely remove the ns_cgroup as
    this flag brings a compatibility. We have now to manually create and add
    the task to a cgroup, which is consistent with the cgroup framework.

    This patch:

    Sent as an answer to a previous thread around the ns_cgroup.

    https://lists.linux-foundation.org/pipermail/containers/2009-June/018627.html

    It adds a control file 'clone_children' for a cgroup. This control file
    is a boolean specifying if the child cgroup should be a clone of the
    parent cgroup or not. The default value is 'false'.

    This flag makes the child cgroup to call the post_clone callback of all
    the subsystem, if it is available.

    At present, the cpuset is the only one which had implemented the
    post_clone callback.

    The option can be set at mount time by specifying the 'clone_children'
    mount option.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: Serge E. Hallyn
    Cc: Eric W. Biederman
    Acked-by: Paul Menage
    Reviewed-by: Li Zefan
    Cc: Jamal Hadi Salim
    Cc: Matt Helsley
    Acked-by: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Lezcano
     
  • fb_{read,write} access the framebuffer using lots of fb_{read,write}l's
    but don't check that the file position is aligned which can cause problems
    on some architectures which do not support unaligned accesses.

    Since the operations are essentially memcpy_{from,to}io, new
    fb_memcpy_{from,to}fb macros have been defined and these are used instead.

    For Sparc, fb_{read,write} macros use sbus_{read,write}, so this defines
    new sbus_memcpy_{from,to}io functions the same as memcpy_{from,to}io but
    using sbus_{read,write}b instead of {read,write}b.

    Signed-off-by: James Hogan
    Acked-by: David S. Miller
    Acked-by: Florian Tobias Schandinat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Hogan
     
  • Some ADP5588 functions take a pointer to an i2c_client, but if the i2c
    header doesn't happen to be included first, we hit the standard "struct
    declared inside parameter list" warnings from gcc. So add a simple
    forward decl of the i2c_client struct.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Common code interprets this as a signed value (a negative value is used to
    request dynamic ID allocation), so make sure the platform data has proper
    types to support that.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Implement irq_chip functionality on ADP5588/5587 GPIO expanders. Only
    level sensitive interrupts are supported. Interrupts provided by this
    irq_chip must be requested using request_threaded_irq().

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Add support for generic 74x164 serial-in/parallel-out 8-bits shift
    register. This driver can be used as a GPIO output expander.

    [akpm@linux-foundation.org: remove unused local `refresh']
    Signed-off-by: Miguel Gaio
    Signed-off-by: Juhos Gabor
    Signed-off-by: Florian Fainelli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miguel Gaio
     
  • commit 7444a72effa632fcd8edc566f88 ("gpiolib: allow user-selection")
    removed HAVE_GPIO_LIB Kconfig symbol, but the header file still uses the
    name [to confuse readers wrt #ifdef/#else/#endif location].

    The real Kconfig symbol nowadays is CONFIG_GPIOLIB.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • The basic GPIO controllers may be found in various on-board FPGA and ASIC
    solutions that are used to control board's switches, LEDs, chip-selects,
    Ethernet/USB PHY power, etc.

    These controllers may not provide any means of pin setup
    (in/out/open drain).

    The driver supports:
    - 8/16/32/64 bits registers;
    - GPIO controllers with clear/set registers;
    - GPIO controllers with a single "data" register;
    - Big endian bits/GPIOs ordering (mostly used on PowerPC).

    Signed-off-by: Anton Vorontsov
    Reviewed-by: Mark Brown
    Cc: David Brownell
    Cc: Samuel Ortiz ,
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Christoph reported a nice splat which illustrated a race in the new stack
    based kmap_atomic implementation.

    The problem is that we pop our stack slot before we're completely done
    resetting its state -- in particular clearing the PTE (sometimes that's
    CONFIG_DEBUG_HIGHMEM). If an interrupt happens before we actually clear
    the PTE used for the last slot, that interrupt can reuse the slot in a
    dirty state, which triggers a BUG in kmap_atomic().

    Fix this by introducing kmap_atomic_idx() which reports the current slot
    index without actually releasing it and use that to find the PTE and delay
    the _pop() until after we're completely done.

    Signed-off-by: Peter Zijlstra
    Reported-by: Christoph Hellwig
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • It appears i386 uses kmap_atomic infrastructure regardless of
    CONFIG_HIGHMEM which results in a compile error when highmem is disabled.

    Cure this by providing the needed few bits for both CONFIG_HIGHMEM and
    CONFIG_X86_32.

    Signed-off-by: Peter Zijlstra
    Reported-by: Chris Wilson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

27 Oct, 2010

24 commits

  • * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (476 commits)
    vmwgfx: Implement a proper GMR eviction mechanism
    drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2
    drm/radeon/kms: properly compute group_size on 6xx/7xx
    drm/radeon/kms: fix 2D tile height alignment in the r600 CS checker
    drm/radeon/kms/evergreen: set the clear state to the blit state
    drm/radeon/kms: don't poll dac load detect.
    gpu: Add Intel GMA500(Poulsbo) Stub Driver
    drm/radeon/kms: MC vram map needs to be >= pci aperture size
    drm/radeon/kms: implement display watermark support for evergreen
    drm/radeon/kms/evergreen: add some additional safe regs v2
    drm/radeon/r600: fix tiling issues in CS checker.
    drm/i915: Move gpu_write_list to per-ring
    drm/i915: Invalidate the to-ring, flush the old-ring when updating domains
    drm/i915/ringbuffer: Write the value passed in to the tail register
    agp/intel: Restore valid PTE bit for Sandybridge after bdd3072
    drm/i915: Fix flushing regression from 9af90d19f
    drm/i915/sdvo: Remove unused encoding member
    i915: enable AVI infoframe for intel_hdmi.c [v4]
    drm/i915: Fix current fb blocking for page flip
    drm/i915: IS_IRONLAKE is synonymous with gen == 5
    ...

    Fix up conflicts in
    - drivers/gpu/drm/i915/{i915_gem.c, i915/intel_overlay.c}: due to the
    new simplified stack-based kmap_atomic() interface
    - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: added .llseek entry due to BKL
    removal cleanups.

    Linus Torvalds
     
  • …scm/linux/kernel/git/jeremy/xen

    * 'upstream/xenfs' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
    xen/privcmd: make privcmd visible in domU
    xen/privcmd: move remap_domain_mfn_range() to core xen code and export.
    privcmd: MMAPBATCH: Fix error handling/reporting
    xenbus: export xen_store_interface for xenfs
    xen/privcmd: make sure vma is ours before doing anything to it
    xen/privcmd: print SIGBUS faults
    xen/xenfs: set_page_dirty is supposed to return true if it dirties
    xen/privcmd: create address space to allow writable mmaps
    xen: add privcmd driver
    xen: add variable hypercall caller
    xen: add xen_set_domain_pte()
    xen: add /proc/xen/xsd_{kva,port} to xenfs

    * 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: (29 commits)
    xen: include xen/xen.h for definition of xen_initial_domain()
    xen: use host E820 map for dom0
    xen: correctly rebuild mfn list list after migration.
    xen: improvements to VIRQ_DEBUG output
    xen: set up IRQ before binding virq to evtchn
    xen: ensure that all event channels start off bound to VCPU 0
    xen/hvc: only notify if we actually sent something
    xen: don't add extra_pages for RAM after mem_end
    xen: add support for PAT
    xen: make sure xen_max_p2m_pfn is up to date
    xen: limit extra memory to a certain ratio of base
    xen: add extra pages for E820 RAM regions, even if beyond mem_end
    xen: make sure xen_extra_mem_start is beyond all non-RAM e820
    xen: implement "extra" memory to reserve space for pages not present at boot
    xen: Use host-provided E820 map
    xen: don't map missing memory
    xen: defer building p2m mfn structures until kernel is mapped
    xen: add return value to set_phys_to_machine()
    xen: convert p2m to a 3 level tree
    xen: make install_p2mtop_page() static
    ...

    Fix up trivial conflict in arch/x86/xen/mmu.c, and fix the use of
    'reserve_early()' - in the new memblock world order it is now
    'memblock_x86_reserve_range()' instead. Pointed out by Jeremy.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
    split invalidate_inodes()
    fs: skip I_FREEING inodes in writeback_sb_inodes
    fs: fold invalidate_list into invalidate_inodes
    fs: do not drop inode_lock in dispose_list
    fs: inode split IO and LRU lists
    fs: switch bdev inode bdi's correctly
    fs: fix buffer invalidation in invalidate_list
    fsnotify: use dget_parent
    smbfs: use dget_parent
    exportfs: use dget_parent
    fs: use RCU read side protection in d_validate
    fs: clean up dentry lru modification
    fs: split __shrink_dcache_sb
    fs: improve DCACHE_REFERENCED usage
    fs: use percpu counter for nr_dentry and nr_dentry_unused
    fs: simplify __d_free
    fs: take dcache_lock inside __d_path
    fs: do not assign default i_ino in new_inode
    fs: introduce a per-cpu last_ino allocator
    new helper: ihold()
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (63 commits)
    IB/qib: clean up properly if pci_set_consistent_dma_mask() fails
    IB/qib: Allow driver to load if PCIe AER fails
    IB/qib: Fix uninitialized pointer if CONFIG_PCI_MSI not set
    IB/qib: Fix extra log level in qib_early_err()
    RDMA/cxgb4: Remove unnecessary KERN_ use
    RDMA/cxgb3: Remove unnecessary KERN_ use
    IB/core: Add link layer type information to sysfs
    IB/mlx4: Add VLAN support for IBoE
    IB/core: Add VLAN support for IBoE
    IB/mlx4: Add support for IBoE
    mlx4_en: Change multicast promiscuous mode to support IBoE
    mlx4_core: Update data structures and constants for IBoE
    mlx4_core: Allow protocol drivers to find corresponding interfaces
    IB/uverbs: Return link layer type to userspace for query port operation
    IB/srp: Sync buffer before posting send
    IB/srp: Use list_first_entry()
    IB/srp: Reduce number of BUSY conditions
    IB/srp: Eliminate two forward declarations
    IB/mlx4: Signal node desc changes to SM by using FW to generate trap 144
    IB: Replace EXTRA_CFLAGS with ccflags-y
    ...

    Linus Torvalds
     
  • Add idr/ida to kernel-api docbook.
    Fix typos and kernel-doc notation.

    Signed-off-by: Randy Dunlap
    Acked-by: Tejun Heo
    Cc: Naohiro Aota
    Cc: Jiri Kosina
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Add more wait, wake, and completion interfaces to the device-drivers
    docbook.

    Fix kernel-doc notation in the added files.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (53 commits)
    ACPI: install ACPI table handler before any dynamic tables being loaded
    ACPI / PM: Blacklist another machine that needs acpi_sleep=nonvs
    ACPI: Page based coalescing of I/O remappings optimization
    ACPI: Convert simple locking to RCU based locking
    ACPI: Pre-map 'system event' related register blocks
    ACPI: Add interfaces for ioremapping/iounmapping ACPI registers
    ACPI: Maintain a list of ACPI memory mapped I/O remappings
    ACPI: Fix ioremap size for MMIO reads and writes
    ACPI / Battery: Return -ENODEV for unknown values in get_property()
    ACPI / PM: Fix reference counting of power resources
    Subject: [PATCH] ACPICA: Fix Scope() op in module level code
    ACPI battery: support percentage battery remaining capacity
    ACPI: Make Embedded Controller command timeout delay configurable
    ACPI dock: move some functions to .init.text
    ACPI: thermal: remove unused limit code
    ACPI: static sleep_states[] and acpi_gts_bfs_check
    ACPI: remove dead code
    ACPI: delete dedicated MAINTAINERS entries for ACPI EC and BATTERY drivers
    ACPI: Only processor needs CPU_IDLE
    ACPICA: Update version to 20101013
    ...

    Linus Torvalds
     
  • * 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
    SFI: remove the v0.7 related definitions from sfi.h

    Linus Torvalds
     
  • * akpm-incoming-1: (176 commits)
    scripts/checkpatch.pl: add check for declaration of pci_device_id
    scripts/checkpatch.pl: add warnings for static char that could be static const char
    checkpatch: version 0.31
    checkpatch: statement/block context analyser should look at sanitised lines
    checkpatch: handle EXPORT_SYMBOL for DEVICE_ATTR and similar
    checkpatch: clean up structure definition macro handline
    checkpatch: update copyright dates
    checkpatch: Add additional attribute #defines
    checkpatch: check for incorrect permissions
    checkpatch: ensure kconfig help checks only apply when we are adding help
    checkpatch: simplify and consolidate "missing space after" checks
    checkpatch: add check for space after struct, union, and enum
    checkpatch: returning errno typically should be negative
    checkpatch: handle casts better fixing false categorisation of : as binary
    checkpatch: ensure we do not collapse bracketed sections into constants
    checkpatch: suggest cleanpatch and cleanfile when appropriate
    checkpatch: types may sit on a line on their own
    checkpatch: fix regressions in "fix handling of leading spaces"
    div64_u64(): improve precision on 32bit platforms
    lib/parser: cleanup match_number()
    ...

    Linus Torvalds
     
  • The current implementation of div64_u64 for 32bit systems returns an
    approximately correct result when the divisor exceeds 32bits. Since doing
    64bit division using 32bit hardware is a long since solved problem we just
    use one of the existing proven methods.

    Additionally, add a div64_s64 function to correctly handle doing signed
    64bit division.

    Addresses https://bugzilla.redhat.com/show_bug.cgi?id=616105

    Signed-off-by: Brian Behlendorf
    Signed-off-by: Oleg Nesterov
    Cc: Ben Woodard
    Cc: Jeremy Fitzhardinge
    Cc: Mark Grondona
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Behlendorf
     
  • printk_ratelimit() was a bad idea - we don't want subsytem A causing
    ratelimiting of subsystem B's messages.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Adding declaration of printk_ratelimit_state in ratelimit.h removes
    potential build breakage and following sparse warning:

    kernel/printk.c:1426:1: warning: symbol 'printk_ratelimit_state' was not declared. Should it be static?

    [akpm@linux-foundation.org: remove unneeded ifdef]
    Signed-off-by: Namhyung Kim
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • PF_FLUSHER is only ever set, not tested, remove it.

    Signed-off-by: Peter Zijlstra
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Robin Holt tried to boot a 16TB system and found af_unix was overflowing
    a 32bit value :

    We were seeing a failure which prevented boot. The kernel was incapable
    of creating either a named pipe or unix domain socket. This comes down
    to a common kernel function called unix_create1() which does:

    atomic_inc(&unix_nr_socks);
    if (atomic_read(&unix_nr_socks) > 2 * get_max_files())
    goto out;

    The function get_max_files() is a simple return of files_stat.max_files.
    files_stat.max_files is a signed integer and is computed in
    fs/file_table.c's files_init().

    n = (mempages * (PAGE_SIZE / 1024)) / 10;
    files_stat.max_files = n;

    In our case, mempages (total_ram_pages) is approx 3,758,096,384
    (0xe0000000). That leaves max_files at approximately 1,503,238,553.
    This causes 2 * get_max_files() to integer overflow.

    Fix is to let /proc/sys/fs/file-nr & /proc/sys/fs/file-max use long
    integers, and change af_unix to use an atomic_long_t instead of atomic_t.

    get_max_files() is changed to return an unsigned long. get_nr_files() is
    changed to return a long.

    unix_nr_socks is changed from atomic_t to atomic_long_t, while not
    strictly needed to address Robin problem.

    Before patch (on a 64bit kernel) :
    # echo 2147483648 >/proc/sys/fs/file-max
    # cat /proc/sys/fs/file-max
    -18446744071562067968

    After patch:
    # echo 2147483648 >/proc/sys/fs/file-max
    # cat /proc/sys/fs/file-max
    2147483648
    # cat /proc/sys/fs/file-nr
    704 0 2147483648

    Reported-by: Robin Holt
    Signed-off-by: Eric Dumazet
    Acked-by: David Miller
    Reviewed-by: Robin Holt
    Tested-by: Robin Holt
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • This is a driver for Avago APDS990X combined ALS and proximity sensor.

    Interface is sysfs based. The driver uses interrupts to provide new data.
    The driver supports pm_runtime and regulator frameworks.

    See Documentation/misc-devices/apds990x.txt for details

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • This is a driver for ROHM BH1770GLC and OSRAM SFH7770 combined ALS and
    proximity sensor.

    Interface is sysfs based. The driver uses interrupts to provide new data.
    The driver supports pm_runtime and regulator frameworks.

    See Documentation/misc-devices/bh1770glc.txt for details

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Silly though it is, completions and wait_queue_heads use foo_ONSTACK
    (COMPLETION_INITIALIZER_ONSTACK, DECLARE_COMPLETION_ONSTACK,
    __WAIT_QUEUE_HEAD_INIT_ONSTACK and DECLARE_WAIT_QUEUE_HEAD_ONSTACK) so I
    guess workqueues should do the same thing.

    s/INIT_WORK_ON_STACK/INIT_WORK_ONSTACK/
    s/INIT_DELAYED_WORK_ON_STACK/INIT_DELAYED_WORK_ONSTACK/

    Cc: Peter Zijlstra
    Acked-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The new init ramfs format (cpio based) requires an alignment of 4 (per the
    documentation and per the source files themselves). As for compressed
    sources, the decompressors can all deal with unaligned buffers.

    The cpio source is also found in the __init sections of the kernel, so
    once they are read and expanded into a tmpfs, the source is freed. That
    means there is no need to force page alignment here either.

    This has been used on Blackfin systems for many releases without issue.

    Signed-off-by: Mike Frysinger
    Cc: Al Viro
    Cc: Sam Ravnborg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • With the recent change "net: remove time limit in process_backlog()", the
    softnet_data variable changed from "DEFINE_PER_CPU()" to
    "DEFINE_PER_CPU_ALIGNED()" which moved it from the .data section to the
    .data.shared_align section. I'm not saying this patch is wrong, just that
    is what caused me to notice this larger problem. No one else in the
    kernel is using this aligned macro variant, so I imagine that's why no one
    has noticed yet.

    Since .data..shared_align isn't declared in any vmlinux files that I can
    see, the linker just places it last. This "just works" for most people,
    but when building a ROM kernel on Blackfin systems, it causes section
    overlap errors:

    bfin-uclinux-ld.real:
    section .init.data [00000000202e06b8 -> 00000000202e48b7] overlaps
    section .data.shared_aligned [00000000202e06b8 -> 00000000202e0723]

    I imagine other arches which support the ROM config option and thus do
    funky placement would see similar issues ...

    On x86, it is stuck in a dedicated section at the end:
    [8] .data PROGBITS ffffffff810ec000 2ec0000303a8 00 WA 0 0 4096
    [9] .data.shared_alig PROGBITS ffffffff8111c3c0 31c3c00000c8 00 WA 0 0 64

    So make sure we include this section in the DATA_DATA macro so that it is
    placed in the right location.

    Signed-off-by: Mike Frysinger
    Cc: Sam Ravnborg
    Cc: Jeremy Fitzhardinge
    Cc: Rusty Russell
    Cc: Alan Jenkins
    Cc: Greg Ungerer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • gcc aligns strings as a performance consideration for those cases where
    strings are being used a lot.

    Their use is not performance critical, and hence it seems better to save
    some space.

    Signed-off-by: Jan Beulich
    Acked-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • The whole point to using the strict functions is to check the return
    value. If you don't, strict_strto*() will return you uninitialised
    garbage. Offenders have been observed in the wild.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Introduce two additional min/max macros to compare three operands. This
    will save some cycles as well as some bytes on the stack and last but not
    least more pleasing as macro nesting.

    [akpm@linux-foundation.org: fix warnings]
    Signed-off-by: Hagen Paul Pfeifer
    Cc: Joe Perches
    Cc: Ingo Molnar
    Cc: Hartley Sweeten
    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Herbert Xu
    Cc: Roland Dreier
    Cc: Sean Hefty
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hagen Paul Pfeifer
     
  • Add vzalloc() and vzalloc_node() to encapsulate the
    vmalloc-then-memset-zero operation.

    Use __GFP_ZERO to zero fill the allocated memory.

    Signed-off-by: Dave Young
    Cc: Christoph Lameter
    Acked-by: Greg Ungerer
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Introduce ___GFP_* masks in order for gfp_t to not be mixed with plain
    integers which causes a lot of warnings like the following:

    warning: restricted gfp_t degrades to integer

    Signed-off-by: Namhyung Kim
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim