Skip to content
  1. Jan 29, 2014
    • Tiejun Chen's avatar
      powerpc/hugetlb: Replace __get_cpu_var with get_cpu_var · 94b09d75
      Tiejun Chen authored
      
      
      Replace __get_cpu_var safely with get_cpu_var to avoid
      the following call trace:
      
      [ 7253.637591] BUG: using smp_processor_id() in preemptible [00000000 00000000]
      code: hugemmap01/9048
      [ 7253.637601] caller is free_hugepd_range.constprop.25+0x88/0x1a8
      [ 7253.637605] CPU: 1 PID: 9048 Comm: hugemmap01 Not tainted 3.10.20-rt14+ #114
      [ 7253.637606] Call Trace:
      [ 7253.637617] [cb049d80] [c0007ea4] show_stack+0x4c/0x168 (unreliable)
      [ 7253.637624] [cb049dc0] [c031c674] debug_smp_processor_id+0x114/0x134
      [ 7253.637628] [cb049de0] [c0016d28] free_hugepd_range.constprop.25+0x88/0x1a8
      [ 7253.637632] [cb049e00] [c001711c] hugetlb_free_pgd_range+0x6c/0x168
      [ 7253.637639] [cb049e40] [c0117408] free_pgtables+0x12c/0x150
      [ 7253.637646] [cb049e70] [c011ce38] unmap_region+0xa0/0x11c
      [ 7253.637671] [cb049ef0] [c011f03c] do_munmap+0x224/0x3bc
      [ 7253.637676] [cb049f20] [c011f2e0] vm_munmap+0x38/0x5c
      [ 7253.637682] [cb049f40] [c000ef88] ret_from_syscall+0x0/0x3c
      [ 7253.637686] --- Exception: c01 at 0xff16004
      
      Signed-off-by: default avatarTiejun <Chen&lt;tiejun.chen@windriver.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      94b09d75
    • Paul Mackerras's avatar
      powerpc: Make sure "cache" directory is removed when offlining cpu · 91b973f9
      Paul Mackerras authored
      
      
      The code in remove_cache_dir() is supposed to remove the "cache"
      subdirectory from the sysfs directory for a CPU when that CPU is
      being offlined.  It tries to do this by calling kobject_put() on
      the kobject for the subdirectory.  However, the subdirectory only
      gets removed once the last reference goes away, and the reference
      being put here may well not be the last reference.  That means
      that the "cache" subdirectory may still exist when the offlining
      operation has finished.  If the same CPU subsequently gets onlined,
      the code tries to add a new "cache" subdirectory.  If the old
      subdirectory has not yet been removed, we get a WARN_ON in the
      sysfs code, with stack trace, and an error message printed on the
      console.  Further, we ultimately end up with an online cpu with no
      "cache" subdirectory.
      
      This fixes it by doing an explicit kobject_del() at the point where
      we want the subdirectory to go away.  kobject_del() removes the sysfs
      directory even though the object still exists in memory.  The object
      will get freed at some point in the future.  A subsequent onlining
      operation can create a new sysfs directory, even if the old object
      still exists in memory, without causing any problems.
      
      Cc: stable@vger.kernel.org # v3.0+
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      91b973f9
    • jmarchan@redhat.com's avatar
      powerpc/mm: Fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed address space · 19751c07
      jmarchan@redhat.com authored
      
      
      According to Posix, if MAP_FIXED is specified mmap shall set ENOMEM if
      the requested mapping exceeds the allowed range for address space of
      the process. The generic code set it right, but the specific powerpc
      slice_get_unmapped_area() function currently returns -EINVAL in that
      case.
      This patch corrects it.
      
      Signed-off-by: default avatarJerome Marchand <jmarchan@redhat.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      19751c07
    • Deepthi Dharwar's avatar
      powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. · 2c2e6ecf
      Deepthi Dharwar authored
      
      
      Following patch ports the cpuidle framework for powernv
      platform and also implements a cpuidle back-end powernv
      idle driver calling on to power7_nap and snooze idle states.
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2c2e6ecf
    • Deepthi Dharwar's avatar
      powerpc/pseries/cpuidle: smt-snooze-delay cleanup. · 3fa8cad8
      Deepthi Dharwar authored
      
      
      smt-snooze-delay was designed to disable NAP state or delay the entry
      to the NAP state prior to adoption of cpuidle framework. This
      is per-cpu variable. With the coming of CPUIDLE framework,
      states can be disabled on per-cpu basis using the cpuidle/enable
      sysfs entry.
      
      Also, with the coming of cpuidle driver each state's target residency
      is per-driver unlike earlier which was per-device. Therefore,
      the per-cpu sysfs smt-snooze-delay which decides the target residency
      of the idle state on a particular cpu causes more confusion to the user
      as we cannot have different smt-snooze-delay (target residency)
      values for each cpu.
      
      In the current code, smt-snooze-delay functionality is completely broken.
      It makes sense to remove smt-snooze-delay from idle driver with the
      coming of cpuidle framework.
      However, sysfs files are retained as ppc64_util currently
      utilises it. Once we fix ppc64_util, propose to clean
      up the kernel code.
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fa8cad8
    • Deepthi Dharwar's avatar
      powerpc/pseries/cpuidle: Remove MAX_IDLE_STATE macro. · bf7f61f2
      Deepthi Dharwar authored
      
      
      This patch removes the usage of MAX_IDLE_STATE macro
      and dead code around it. The number of states
      are determined at run time based on the cpuidle
      state table selected on a given platform
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bf7f61f2
    • Deepthi Dharwar's avatar
      powerpc/pseries/cpuidle: Make cpuidle-pseries backend driver a non-module. · 12431c64
      Deepthi Dharwar authored
      
      
      Currently cpuidle-pseries backend driver cannot be
      built as a module due to dependencies wrt cpuidle framework.
      This patch removes all the module related code in the driver.
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      12431c64
    • Deepthi Dharwar's avatar
      powerpc/pseries/cpuidle: Use cpuidle_register() for initialisation. · b69dbba0
      Deepthi Dharwar authored
      
      
      This patch replaces the cpuidle driver and devices initialisation
      calls with a single generic cpuidle_register() call
      and also includes minor refactoring of the code around it.
      
      Remove the cpu online check in snooze loop, as this code can
      only locally run on a cpu only if it is online. Therefore,
      this check is not required.
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b69dbba0
    • Deepthi Dharwar's avatar
      powerpc/pseries/cpuidle: Move processor_idle.c to drivers/cpuidle. · 962e7bd4
      Deepthi Dharwar authored
      
      
      Move the file from arch specific pseries/processor_idle.c
      to drivers/cpuidle/cpuidle-pseries.c
      Make the relevant Makefile and Kconfig changes.
      Also, introduce Kconfig.powerpc in drivers/cpuidle
      for all powerpc cpuidle drivers.
      
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      962e7bd4
    • Paul Mackerras's avatar
      powerpc: Fix 32-bit frames for signals delivered when transactional · d765ff23
      Paul Mackerras authored
      Commit d31626f7
      
       ("powerpc: Don't corrupt transactional state when
      using FP/VMX in kernel") introduced a bug where the uc_link and uc_regs
      fields of the ucontext_t that is created to hold the transactional
      values of the registers in a 32-bit signal frame didn't get set
      correctly.  The reason is that we now clear the MSR_TS bits in the MSR
      in save_tm_user_regs(), before the code that sets uc_link and uc_regs.
      To fix this, we move the setting of uc_link and uc_regs into the same
      if statement that selects whether to call save_tm_user_regs() or
      save_user_regs().
      
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d765ff23
    • Alistair Popple's avatar
      powerpc/iommu: Fix initialisation of DART iommu table · 67bfa0ee
      Alistair Popple authored
      Commit d0847757 switched the generic
      powerpc iommu backend code to use the it_page_shift field to determine
      page size. Commit 3a553170
      
       should have
      initiliased this field for all platforms, however the DART iommu table
      code was not updated.
      
      This commit initialises the it_page_shift field to 4K for the DART
      iommu.
      
      Signed-off-by: default avatarAlistair Popple <alistair@popple.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      67bfa0ee
    • Joe Perches's avatar
      powerpc/numa: Fix decimal permissions · 316d7188
      Joe Perches authored
      
      
      This should have been octal.
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      316d7188
    • Li Zhong's avatar
      powerpc/mm: Fix compile error of pgtable-ppc64.h · fd120dc2
      Li Zhong authored
      
      
      It seems that forward declaration couldn't work well with typedef, use
      struct spinlock directly to avoiding following build errors:
      
      In file included from include/linux/spinlock.h:81,
                       from include/linux/seqlock.h:35,
                       from include/linux/time.h:5,
                       from include/uapi/linux/timex.h:56,
                       from include/linux/timex.h:56,
                       from include/linux/sched.h:17,
                       from arch/powerpc/kernel/asm-offsets.c:17:
      include/linux/spinlock_types.h:76: error: redefinition of typedef 'spinlock_t'
      /root/linux-next/arch/powerpc/include/asm/pgtable-ppc64.h:563: note: previous declaration of 'spinlock_t' was here
      
      Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      fd120dc2
    • Andreas Schwab's avatar
      powerpc: Fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations · 1c430c06
      Andreas Schwab authored
      
      
      This fixes a logic error that caused a failure to update the hw breakpoint
      registers when not using the hw-breakpoint interface.
      
      Signed-off-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1c430c06
    • Benjamin Herrenschmidt's avatar
      Merge remote-tracking branch 'scott/next' into next · 6e677ef6
      Benjamin Herrenschmidt authored
      <<
      This contains a fix for a chroma_defconfig build break that was
      introduced by e6500 tablewalk support, and a device tree binding patch
      that missed the previous pull request due to some last-minute polishing.
      >>
      6e677ef6
    • Benjamin Herrenschmidt's avatar
      Merge remote-tracking branch 'agust/next' into next · e9a37110
      Benjamin Herrenschmidt authored
      <<
      Switch mpc512x to the common clock framework and adapt mpc512x
      drivers to use the new clock driver. Old PPC_CLOCK code is
      removed entirely since there are no users any more.
      >>
      e9a37110
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · d891ea23
      Linus Torvalds authored
      Pull ceph updates from Sage Weil:
       "This is a big batch.  From Ilya we have:
      
         - rbd support for more than ~250 mapped devices (now uses same scheme
           that SCSI does for device major/minor numbering)
         - crush updates for new mapping behaviors (will be needed for coming
           erasure coding support, among other things)
         - preliminary support for tiered storage pools
      
        There is also a big series fixing a pile cephfs bugs with clustered
        MDSs from Yan Zheng, ACL support for cephfs from Guangliang Zhao, ceph
        fscache improvements from Li Wang, improved behavior when we get
        ENOSPC from Josh Durgin, some readv/writev improvements from
        Majianpeng, and the usual mix of small cleanups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (76 commits)
        ceph: cast PAGE_SIZE to size_t in ceph_sync_write()
        ceph: fix dout() compile warnings in ceph_filemap_fault()
        libceph: support CEPH_FEATURE_OSD_CACHEPOOL feature
        libceph: follow redirect replies from osds
        libceph: rename ceph_osd_request::r_{oloc,oid} to r_base_{oloc,oid}
        libceph: follow {read,write}_tier fields on osd request submission
        libceph: add ceph_pg_pool_by_id()
        libceph: CEPH_OSD_FLAG_* enum update
        libceph: replace ceph_calc_ceph_pg() with ceph_oloc_oid_to_pg()
        libceph: introduce and start using oid abstraction
        libceph: rename MAX_OBJ_NAME_SIZE to CEPH_MAX_OID_NAME_LEN
        libceph: move ceph_file_layout helpers to ceph_fs.h
        libceph: start using oloc abstraction
        libceph: dout() is missing a newline
        libceph: add ceph_kv{malloc,free}() and switch to them
        libceph: support CEPH_FEATURE_EXPORT_PEER
        ceph: add imported caps when handling cap export message
        ceph: add open export target session helper
        ceph: remove exported caps when handling cap import message
        ceph: handle session flush message
        ...
      d891ea23
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd · 08d21b5f
      Linus Torvalds authored
      Pull exofs and ore fixes from Boaz Harrosh:
       "The main fix here, the first patch, is also destined for -stable.  The
        rest is small trivia and cosmetics.  The ORE patches effect both exofs
        and pnfs-objects very reproducible bugs"
      
      [ ORE is "object raid engine", used by exofs and pnfs  - Linus ]
      
      * 'for-linus' of git://git.open-osd.org/linux-open-osd:
        exofs: Print less in r4w
        exofs: Allow corrupted directory entry to be empty file
        exofs: Allow O_DIRECT open
        ore: Don't crash on NULL bio in _clear_bio
        ore: Fix wrong math in allocation of per device BIO
      08d21b5f
    • Ilya Dryomov's avatar
      ceph: cast PAGE_SIZE to size_t in ceph_sync_write() · 125d725c
      Ilya Dryomov authored
      
      
      Use min_t(size_t, ...) instead of plain min(), which does strict type
      checking, to avoid compile warning on i386.
      
      Cc: Jianpeng Ma <majianpeng@gmail.com>
      Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: default avatarSage Weil <sage@inktank.com>
      125d725c
    • Ilya Dryomov's avatar
      ceph: fix dout() compile warnings in ceph_filemap_fault() · 37b52fe6
      Ilya Dryomov authored
      
      
      PAGE_CACHE_SIZE is unsigned long on all architectures, however size_t
      is either unsigned int or unsigned long.  Rather than change format
      strings, cast PAGE_CACHE_SIZE to size_t to be in line with dout()s in
      ceph_page_mkwrite().
      
      Cc: Yan, Zheng <zheng.z.yan@intel.com>
      Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: default avatarSage Weil <sage@inktank.com>
      37b52fe6
    • Linus Torvalds's avatar
      Merge tag 'microblaze-3.14-rc1' of git://git.monstr.eu/linux-2.6-microblaze · 627f4b3e
      Linus Torvalds authored
      Pull microblaze patches from Michal Simek:
       - add CCF support
       - fix BS=0 compilation
       - wire up defconfig
       - some minor cleanups and fixes
      
      * tag 'microblaze-3.14-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Add missing v8.50.a version
        microblaze: Fix missing bracket in printk
        microblaze: Fix compilation error for BS=0
        microblaze: Disable stack protection from bootloader
        microblaze: Define read/write{b,w,l}_relaxed MMIO
        microblaze: timer: Do not initialized system timer twice
        microblaze: timer: Use generic sched_clock implementation
        microblaze: Add NOTES section to linker script
        microblaze: Add support for CCF
        microblaze: Simplify fcpu helper function
        microblaze/uapi: Use Kbuild logic to include <asm-generic/types.h>
        microblaze: Remove duplicate declarations of _stext[] and _etext[]
        microblaze: Remove _fdt_start casts
        microblaze: Wire up defconfig to mmu_defconfig
      627f4b3e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · e770d73c
      Linus Torvalds authored
      Pull s390 patches from Martin Schwidefsky:
       "A new binary interface to be able to query and modify the LPAR
        scheduler weight and cap settings.  Some improvements for the hvc
        terminal over iucv and a couple of bux fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/hypfs: add interface for diagnose 0x304
        s390: wire up sys_sched_setattr/sys_sched_getattr
        s390/uapi: fix struct statfs64 definition
        s390/uaccess: remove dead extern declarations, make functions static
        s390/uaccess: test if current->mm is set before walking page tables
        s390/zfcpdump: make zfcpdump depend on 64BIT
        s390/32bit: fix cmpxchg64
        s390/xpram: don't modify module parameters
        s390/zcrypt: remove zcrypt kmsg documentation again
        s390/hvc_iucv: Automatically assign free HVC terminal devices
        s390/hvc_iucv: Display connection details through device attributes
        s390/hvc_iucv: fix sparse warning
        s390/vmur: Link parent CCW device during UR device creation
      e770d73c
    • Linus Torvalds's avatar
      Merge tag 'cris-correction-for-3.14' of git://jni.nu/cris · be864971
      Linus Torvalds authored
      Pull cris fix from Jesper Nilsson:
       "One include too much was removed"
      
      * tag 'cris-correction-for-3.14' of git://jni.nu/cris:
        CRISv10: Readd missing header
      be864971
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a53b75b3
      Linus Torvalds authored
      Pull ext4 update from Ted Ts'o:
       "Bug fixes and cleanups for ext4.  We also enable the punch hole
        functionality for bigalloc file systems"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: delete "set but not used" variables
        ext4: don't pass freed handle to ext4_walk_page_buffers
        ext4: avoid clearing beyond i_blocks when truncating an inline data file
        ext4: ext4_inode_is_fast_symlink should use EXT4_CLUSTER_SIZE
        ext4: fix a typo in extents.c
        ext4: use %pd printk specificer
        ext4: standardize error handling in ext4_da_write_inline_data_begin()
        ext4: retry allocation when inline->extent conversion failed
        ext4: enable punch hole for bigalloc
      a53b75b3
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 2b2b15c3
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
         - stable fix for an infinite loop in RPC state machine
         - stable fix for a use after free situation in the NFSv4 trunking discovery
         - stable fix for error handling in the NFSv4 trunking discovery
         - stable fix for the page write update code
         - stable fix for the NFSv4.1 mount time security negotiation
         - stable fix for the NFSv4 open code.
         - O_DIRECT locking fixes
         - fix an Oops in the pnfs file commit code
         - RPC layer needs finer grained handling of connection errors
         - more RPC GSS upcall fixes"
      
      * tag 'nfs-for-3.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (30 commits)
        pnfs: Proper delay for NFS4ERR_RECALLCONFLICT in layout_get_done
        pnfs: fix BUG in filelayout_recover_commit_reqs
        nfs4: fix discover_server_trunking use after free
        NFSv4.1: Handle errors correctly in nfs41_walk_client_list
        nfs: always make sure page is up-to-date before extending a write to cover the entire page
        nfs: page cache invalidation for dio
        nfs: take i_mutex during direct I/O reads
        nfs: merge nfs_direct_write into nfs_file_direct_write
        nfs: merge nfs_direct_read into nfs_file_direct_read
        nfs: increment i_dio_count for reads, too
        nfs: defer inode_dio_done call until size update is done
        nfs: fix size updates for aio writes
        nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME
        NFSv4.1: Fix a race in nfs4_write_inode
        NFSv4.1: Don't trust attributes if a pNFS LAYOUTCOMMIT is outstanding
        point to the right include file in a comment (left over from a9004abc)
        NFS: dprintk() should not print negative fileids and inode numbers
        nfs: fix dead code of ipv6_addr_scope
        sunrpc: Fix infinite loop in RPC state machine
        SUNRPC: Add tracepoint for socket errors
        ...
      2b2b15c3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · bf3d846b
      Linus Torvalds authored
      Pull vfs updates from Al Viro:
       "Assorted stuff; the biggest pile here is Christoph's ACL series.  Plus
        assorted cleanups and fixes all over the place...
      
        There will be another pile later this week"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (43 commits)
        __dentry_path() fixes
        vfs: Remove second variable named error in __dentry_path
        vfs: Is mounted should be testing mnt_ns for NULL or error.
        Fix race when checking i_size on direct i/o read
        hfsplus: remove can_set_xattr
        nfsd: use get_acl and ->set_acl
        fs: remove generic_acl
        nfs: use generic posix ACL infrastructure for v3 Posix ACLs
        gfs2: use generic posix ACL infrastructure
        jfs: use generic posix ACL infrastructure
        xfs: use generic posix ACL infrastructure
        reiserfs: use generic posix ACL infrastructure
        ocfs2: use generic posix ACL infrastructure
        jffs2: use generic posix ACL infrastructure
        hfsplus: use generic posix ACL infrastructure
        f2fs: use generic posix ACL infrastructure
        ext2/3/4: use generic posix ACL infrastructure
        btrfs: use generic posix ACL infrastructure
        fs: make posix_acl_create more useful
        fs: make posix_acl_chmod more useful
        ...
      bf3d846b
  2. Jan 28, 2014