30 Dec, 2011

1 commit

  • Commit 2a95ea6c0d129b4 ("procfs: do not overflow get_{idle,iowait}_time
    for nohz") did not take into account that one some architectures jiffies
    and cputime use different units.

    This causes get_idle_time() to return numbers in the wrong units, making
    the idle time fields in /proc/stat wrong.

    Instead of converting the usec value returned by
    get_cpu_{idle,iowait}_time_us to units of jiffies, use the new function
    usecs_to_cputime64 to convert it to the correct unit of cputime64_t.

    Signed-off-by: Andreas Schwab
    Acked-by: Michal Hocko
    Cc: Arnd Bergmann
    Cc: "Artem S. Tashkinov"
    Cc: Dave Jones
    Cc: Alexey Dobriyan
    Cc: Thomas Gleixner
    Cc: "Luck, Tony"
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Schwab
     

04 Dec, 2011

1 commit


01 Nov, 2011

6 commits

  • This is the fifth version of the patchset (with one tiny whitespace fix)
    to the Linux kernel to support the Qualcomm Hexagon architecture.

    Between now and the next pull requests, Richard Kuo should have his key
    signed, etc., and should be back on kernel.org. In the meantime, this
    got merged as a emailed patch-series.

    * Hexagon: (36 commits)
    Add extra arch overrides to asm-generic/checksum.h
    Hexagon: Add self to MAINTAINERS
    Hexagon: Add basic stacktrace functionality for Hexagon architecture.
    Hexagon: Add configuration and makefiles for the Hexagon architecture.
    Hexagon: Comet platform support
    Hexagon: kgdb support files
    Hexagon: Add page-fault support.
    Hexagon: Add page table header files & etc.
    Hexagon: Add ioremap support
    Hexagon: Provide DMA implementation
    Hexagon: Implement basic TLB management routines for Hexagon.
    Hexagon: Implement basic cache-flush support
    Hexagon: Provide basic implementation and/or stubs for I/O routines.
    Hexagon: Add user access functions
    Hexagon: Add locking types and functions
    Hexagon: Add SMP support
    Hexagon: Provide basic debugging and system trap support.
    Hexagon: Add ptrace support
    Hexagon: Add time and timer functions
    Hexagon: Add interrupts
    ...

    Linus Torvalds
     
  • There are plausible reasons for architectures to provide their own
    versions of csum_partial_copy_nocheck and csum_tcpudp_magic.
    By protecting these, the architecture can still re-use the
    asm-generic checksum.h, instead of copying it.

    Signed-off-by: Linas Vepstas
    Acked-by: Arnd Bergmann
    Signed-off-by: Richard Kuo
    Signed-off-by: Linus Torvalds

    Linas Vepstas
     
  • Signed-off-by: Richard Kuo
    Acked-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Richard Kuo
     
  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • On NOMMU architectures, if physical memory doesn't start from 0,
    ARCH_PFN_OFFSET is defined to generate page index in mem_map array.
    Because virtual address is equal to physical address, PAGE_OFFSET is
    always 0. virt_to_page and page_to_virt should not index page by
    PAGE_OFFSET directly.

    Signed-off-by: Sonic Zhang
    Cc: Greg Ungerer
    Cc: Geert Uytterhoeven
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sonic Zhang
     
  • Commit 5fd75a7850b5 (dma-mapping: remove unnecessary sync_single_range_*
    in dma_map_ops) unified not only the dma_map_ops but also the
    corresponding debug_dma_sync_* calls. This led to spurious WARN()ings
    like the following because the DMA debug code was no longer able to detect
    the DMA buffer base address without the separate offset parameter:

    WARNING: at lib/dma-debug.c:911 check_sync+0xce/0x446()
    firewire_ohci 0000:04:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x00000000cedaa400] [size=1024 bytes]
    Call Trace: ...
    [] check_sync+0xce/0x446
    [] debug_dma_sync_single_for_device+0x39/0x3b
    [] ohci_queue_iso+0x4f3/0x77d [firewire_ohci]
    ...

    To fix this, unshare the sync_single_* and sync_single_range_*
    implementations so that we are able to call the correct debug_dma_sync_*
    functions.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Clemens Ladisch
    Cc: FUJITA Tomonori
    Cc: Konrad Rzeszutek Wilk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     

29 Oct, 2011

1 commit

  • * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
    h8300: Move gpio.h to gpio-internal.h
    gpio: pl061: add DT binding support
    gpio: fix build error in include/asm-generic/gpio.h
    gpiolib: Ensure struct gpio is always defined
    irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip
    gpio-ml-ioh: Use NUMA_NO_NODE not GFP_KERNEL
    gpio-pch: Use NUMA_NO_NODE not GFP_KERNEL
    gpio: langwell: ensure alternate function is cleared
    gpio-pch: Support interrupt function
    gpio-pch: Save register value in suspend()
    gpio-pch: modify gpio_nums and mask
    gpio-pch: support ML7223 IOH n-Bus
    gpio-pch: add spinlock in suspend/resume processing
    gpio-pch: Delete invalid "restore" code in suspend()
    gpio-ml-ioh: Fix suspend/resume issue
    gpio-ml-ioh: Support interrupt function
    gpio-ml-ioh: Delete unnecessary code
    gpio/mxc: add chained_irq_enter/exit() to mx3_gpio_irq_handler()
    gpio/nomadik: use genirq core to track enablement
    gpio/nomadik: disable clocks when unused

    Linus Torvalds
     

27 Oct, 2011

1 commit


26 Oct, 2011

1 commit

  • * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
    time, s390: Get rid of compile warning
    dw_apb_timer: constify clocksource name
    time: Cleanup old CONFIG_GENERIC_TIME references that snuck in
    time: Change jiffies_to_clock_t() argument type to unsigned long
    alarmtimers: Fix error handling
    clocksource: Make watchdog reset lockless
    posix-cpu-timers: Cure SMP accounting oddities
    s390: Use direct ktime path for s390 clockevent device
    clockevents: Add direct ktime programming function
    clockevents: Make minimum delay adjustments configurable
    nohz: Remove "Switched to NOHz mode" debugging messages
    proc: Consider NO_HZ when printing idle and iowait times
    nohz: Make idle/iowait counter update conditional
    nohz: Fix update_ts_time_stat idle accounting
    cputime: Clean up cputime_to_usecs and usecs_to_cputime macros
    alarmtimers: Rework RTC device selection using class interface
    alarmtimers: Add try_to_cancel functionality
    alarmtimers: Add more refined alarm state tracking
    alarmtimers: Remove period from alarm structure
    alarmtimers: Remove interval cap limit hack
    ...

    Linus Torvalds
     

25 Oct, 2011

2 commits

  • * 'for-3.2' of git://linux-nfs.org/~bfields/linux: (103 commits)
    nfs41: implement DESTROY_CLIENTID operation
    nfsd4: typo logical vs bitwise negate for want_mask
    nfsd4: allow NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL | NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED
    nfsd4: seq->status_flags may be used unitialized
    nfsd41: use SEQ4_STATUS_BACKCHANNEL_FAULT when cb_sequence is invalid
    nfsd4: implement new 4.1 open reclaim types
    nfsd4: remove unneeded CLAIM_DELEGATE_CUR workaround
    nfsd4: warn on open failure after create
    nfsd4: preallocate open stateid in process_open1()
    nfsd4: do idr preallocation with stateid allocation
    nfsd4: preallocate nfs4_file in process_open1()
    nfsd4: clean up open owners on OPEN failure
    nfsd4: simplify process_open1 logic
    nfsd4: make is_open_owner boolean
    nfsd4: centralize renew_client() calls
    nfsd4: typo logical vs bitwise negate
    nfs: fix bug about IPv6 address scope checking
    nfsd4: more robust ignoring of WANT bits in OPEN
    nfsd4: move name-length checks to xdr
    nfsd4: move access/deny validity checks to xdr code
    ...

    Linus Torvalds
     
  • Markers have removed already twice:

    1: fc5377668c3d808e1d53c4aee152c836f55c3490
    2: eb878b3bc0349344dbf70c51bf01fc734d5cf2d3

    But a little bit is still here.

    Signed-off-by: Tkhai Kirill
    Signed-off-by: Geert Uytterhoeven

    Kirill Tkhai
     

24 Oct, 2011

1 commit

  • Currently struct gpio is only defined when using gpiolib which makes the
    stub gpio_request_array() much less useful in drivers than is ideal as
    they can't work with struct gpio. Since there are no other definitions
    in kernel instead make the define always available no matter if gpiolib
    is selectable or selected, ensuring that drivers can always use the
    type.

    Signed-off-by: Mark Brown
    Signed-off-by: Grant Likely

    Mark Brown
     

08 Sep, 2011

1 commit


27 Aug, 2011

1 commit


20 Aug, 2011

1 commit


18 Aug, 2011

1 commit

  • This allows the cast in lowmem_page_address (introduced as a warning
    fixup to 33dd4e0ec911 "mm: make some struct page's const") to be
    removed.

    Propagate const'ness to page_to_section() as well since it is required
    by __page_to_pfn.

    Signed-off-by: Ian Campbell
    Acked-by: Rik van Riel
    Cc: Andrea Arcangeli
    Cc: Michel Lespinasse
    Cc: Mel Gorman
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     

27 Jul, 2011

10 commits

  • …git/arm/linux-arm-soc

    * 'next/cross-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
    ARM: Consolidate the clkdev header files
    ARM: set vga memory base at run-time
    ARM: convert PCI defines to variables
    ARM: pci: make pcibios_assign_all_busses use pci_has_flag
    ARM: remove unnecessary mach/hardware.h includes
    pci: move microblaze and powerpc pci flag functions into asm-generic
    powerpc: rename ppc_pci_*_flags to pci_*_flags

    Fix up conflicts in arch/microblaze/include/asm/pci-bridge.h

    Linus Torvalds
     
  • Only a few core funcs need to be implemented for SMP systems, so allow the
    arches to override them while getting the rest for free.

    At least, this is enough to allow the Blackfin SMP port to use things.

    Signed-off-by: Mike Frysinger
    Cc: Arun Sharma
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Since arches are expected to implement this guy, add a common version for
    people the same way as atomic_clear_mask is handled.

    Signed-off-by: Mike Frysinger
    Cc: Arun Sharma
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • The atomic helpers are supposed to take an atomic_t pointer, not a random
    unsigned long pointer. So convert atomic_clear_mask over.

    While we're here, also add some nice documentation to the func.

    Signed-off-by: Mike Frysinger
    Cc: Arun Sharma
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • We already declared inc/dec helpers, so we don't need to call the
    atomic_{add,sub}_return funcs directly.

    Signed-off-by: Mike Frysinger
    Cc: Arun Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • This clarifies the differences between and

    Signed-off-by: Arun Sharma
    Suggested-by: Mike Frysinger
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • After changing all consumers of atomics to include , we
    ran into some compile time errors due to this dependency chain:

    linux/atomic.h
    -> asm/atomic.h
    -> asm-generic/atomic-long.h

    where atomic-long.h could use funcs defined later in linux/atomic.h
    without a prototype. This patches moves the code that includes
    asm-generic/atomic*.h to linux/atomic.h.

    Archs that need need to select
    CONFIG_GENERIC_ATOMIC64 from now on (some of them used to include it
    unconditionally).

    Compile tested on i386 and x86_64 with allnoconfig.

    Signed-off-by: Arun Sharma
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This is in preparation for more generic atomic primitives based on
    __atomic_add_unless.

    Signed-off-by: Arun Sharma
    Signed-off-by: Hans-Christian Egtvedt
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • The majority of architectures implement ext2 atomic bitops as
    test_and_{set,clear}_bit() without spinlock.

    This adds this type of generic implementation in ext2-atomic-setbit.h and
    use it wherever possible.

    Signed-off-by: Akinobu Mita
    Suggested-by: Andreas Dilger
    Suggested-by: Arnd Bergmann
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

26 Jul, 2011

3 commits

  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • This header isn't exported to user-space, and even if it was, the
    __KERNEL__ check covers the entire file, so we'd get a useless stub in the
    first place. So punt it.

    Signed-off-by: Mike Frysinger
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • When CONFIG_PCI is not enabled, CONFIG_EISA=y, and CONFIG_GENERIC_IOMAP=y,
    drivers/net/3c59x.c build fails due to a recent small change to
    that surrounds pci_iomap() and pci_iounmap() with
    #ifdef CONFIG_PCI/#endif.

    Since that patch to iomap.h looks correct, add stubs for pci_iomap() and
    pci_iounmap() with CONFIG_PCI is not enabled to fix the build errors.

    drivers/net/3c59x.c:1026: error: implicit declaration of function 'pci_iomap'
    drivers/net/3c59x.c:1038: error: implicit declaration of function 'pci_iounmap'

    Signed-off-by: Randy Dunlap
    Cc: Jonas Bonn
    Cc: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

23 Jul, 2011

3 commits

  • Use the CONFIG_HAS_IOPORT and CONFIG_PCI options to decide whether or
    not functions for mapping these areas are provided.

    Signed-off-by: Jonas Bonn
    Acked-by: Arnd Bergmann

    Jonas Bonn
     
  • Some of the implementations, in particular the ioremap variants, in
    asm-generic/io.h are for systems without an MMU. In order to be able to
    use the generic header file for systems with an MMU, this patch wraps
    these implementations in checks for CONFIG_MMU.

    Tested on OpenRISC.

    Signed-off-by: Jonas Bonn
    Cc: liqin.chen@sunplusct.com
    Cc: gxt@mprc.pku.edu.cn
    Acked-by: Mike Frysinger
    Acked-by: Arnd Bergmann

    Jonas Bonn
     
  • With a non-constant 8-bit argument, a call to udelay() generates a warning:

    drivers/gpu/drm/radeon/atom.c: In function 'atom_op_delay':
    drivers/gpu/drm/radeon/atom.c:654: warning: comparison is always false due to limited range of data type

    The code looks like it works OK with an 8-bit arg, and the calling code is
    doing nothing wrong, so udelay() needs fixing.

    Fixing it was rather tricky. Simply typecasting `n' in the comparison with
    20000 didn't change anything. Hence the divide-by-20000 trick.

    Using a do{}while loop didn't work because udelay() is used in ?: statements,
    hence the ({...}) construct.

    While I was there I replaced the brain-bending ?:?:?: mess with nice if/else
    code.

    Probably other architectures are generating the same warning and can use a
    similar change.

    [Taken from the x86 tree and moved to asm-generic by Jonas Bonn]

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Jonas Bonn

    Andrew Morton
     

13 Jul, 2011

1 commit


08 Jul, 2011

1 commit

  • Several architectures are using a common delay.h implementation that
    appears to have originated with the x86 architecture. This common
    implementation is a bit fuller than the current asm-generic version
    and has some compile-time checks that should be interesting for all
    architectures.

    This patch takes the common delay.h version and replaces the rather
    trivial asm-generic version with it. As no architecture was actually
    using asm-generic/delay.h, this change is rather innocuous; it will,
    however, allow us to switch at least four architectures over to using
    the asm-generic version.

    Signed-off-by: Jonas Bonn
    Acked-by: Arnd Bergmann

    Jonas Bonn
     

18 Jun, 2011

1 commit


16 Jun, 2011

2 commits


03 Jun, 2011

1 commit