1. 29 May, 2011 40 commits
    • Linus Torvalds's avatar
      arm gpio drivers: make them 'depends on ARM' · fac04863
      Linus Torvalds authored
      We had a few drivers move from arch/arm into drivers/gpio, but they
      don't actually compile without the ARM platform headers etc.  As a
      result they were messing up allyesconfig on x86.
      
      Make them depend on ARM.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fac04863
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of... · 2ba781ce
      Linus Torvalds authored
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (43 commits)
        acer-wmi: support integer return type from WMI methods
        msi-laptop: fix section mismatch in reference from the function load_scm_model_init
        acer-wmi: support to set communication device state by new wmid method
        acer-wmi: allow 64-bits return buffer from WMI methods
        acer-wmi: check the existence of internal 3G device when set capability
        platform/x86:delete two unused variables
        support wlan hotkey on Acer Travelmate 5735Z
        platform-x86: intel_mid_thermal: Fix memory leak
        platform/x86: Fix Makefile for intel_mid_powerbtn
        platform/x86: Simplify intel_mid_powerbtn
        acer-wmi: Delete out-of-date documentation
        acerhdf: Clean up includes
        acerhdf: Drop pointless dependency on THERMAL_HWMON
        acer-wmi: Update MAINTAINERS
        wmi: Orphan ACPI-WMI driver
        tc1100-wmi: Orphan driver
        acer-wmi: does not allow negative number set to initial device state
        platform/oaktrail: ACPI EC Extra driver for Oaktrail
        thinkpad_acpi: Convert printks to pr_<level>
        thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning
        ...
      2ba781ce
    • Linus Torvalds's avatar
      mm: Fix boot crash in mm_alloc() · 6345d24d
      Linus Torvalds authored
      Thomas Gleixner reports that we now have a boot crash triggered by
      CONFIG_CPUMASK_OFFSTACK=y:
      
          BUG: unable to handle kernel NULL pointer dereference at   (null)
          IP: [<c11ae035>] find_next_bit+0x55/0xb0
          Call Trace:
           [<c11addda>] cpumask_any_but+0x2a/0x70
           [<c102396b>] flush_tlb_mm+0x2b/0x80
           [<c1022705>] pud_populate+0x35/0x50
           [<c10227ba>] pgd_alloc+0x9a/0xf0
           [<c103a3fc>] mm_init+0xec/0x120
           [<c103a7a3>] mm_alloc+0x53/0xd0
      
      which was introduced by commit de03c72c ("mm: convert
      mm->cpu_vm_cpumask into cpumask_var_t"), and is due to wrong ordering of
      mm_init() vs mm_init_cpumask
      
      Thomas wrote a patch to just fix the ordering of initialization, but I
      hate the new double allocation in the fork path, so I ended up instead
      doing some more radical surgery to clean it all up.
      Reported-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6345d24d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · cab0d85c
      Linus Torvalds authored
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
        [S390] mm: fix mmu_gather rework
        [S390] mm: fix storage key handling
      cab0d85c
    • Linus Torvalds's avatar
    • Matthew Garrett's avatar
      437cb0db
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.40' of git://linux-nfs.org/~bfields/linux · a74d70b6
      Linus Torvalds authored
      * 'for-2.6.40' of git://linux-nfs.org/~bfields/linux: (22 commits)
        nfsd: make local functions static
        NFSD: Remove unused variable from nfsd4_decode_bind_conn_to_session()
        NFSD: Check status from nfsd4_map_bcts_dir()
        NFSD: Remove setting unused variable in nfsd_vfs_read()
        nfsd41: error out on repeated RECLAIM_COMPLETE
        nfsd41: compare request's opcnt with session's maxops at nfsd4_sequence
        nfsd v4.1 lOCKT clientid field must be ignored
        nfsd41: add flag checking for create_session
        nfsd41: make sure nfs server process OPEN with EXCLUSIVE4_1 correctly
        nfsd4: fix wrongsec handling for PUTFH + op cases
        nfsd4: make fh_verify responsibility of nfsd_lookup_dentry caller
        nfsd4: introduce OPDESC helper
        nfsd4: allow fh_verify caller to skip pseudoflavor checks
        nfsd: distinguish functions of NFSD_MAY_* flags
        svcrpc: complete svsk processing on cb receive failure
        svcrpc: take advantage of tcp autotuning
        SUNRPC: Don't wait for full record to receive tcp data
        svcrpc: copy cb reply instead of pages
        svcrpc: close connection if client sends short packet
        svcrpc: note network-order types in svc_process_calldir
        ...
      a74d70b6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm · b11b06d9
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
        dm kcopyd: return client directly and not through a pointer
        dm kcopyd: reserve fewer pages
        dm io: use fixed initial mempool size
        dm kcopyd: alloc pages from the main page allocator
        dm kcopyd: add gfp parm to alloc_pl
        dm kcopyd: remove superfluous page allocation spinlock
        dm kcopyd: preallocate sub jobs to avoid deadlock
        dm kcopyd: avoid pointless job splitting
        dm mpath: do not fail paths after integrity errors
        dm table: reject devices without request fns
        dm table: allow targets to support discards internally
      b11b06d9
    • Linus Torvalds's avatar
      Merge branch 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 · f1d1c9fa
      Linus Torvalds authored
      * 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
        SUNRPC: Support for RPC over AF_LOCAL transports
        SUNRPC: Remove obsolete comment
        SUNRPC: Use AF_LOCAL for rpcbind upcalls
        SUNRPC: Clean up use of curly braces in switch cases
        NFS: Revert NFSROOT default mount options
        SUNRPC: Rename xs_encode_tcp_fragment_header()
        nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu()
        nfs41: Correct offset for LAYOUTCOMMIT
        NFS: nfs_update_inode: print current and new inode size in debug output
        NFSv4.1: Fix the handling of NFS4ERR_SEQ_MISORDERED errors
        NFSv4: Handle expired stateids when the lease is still valid
        SUNRPC: Deal with the lack of a SYN_SENT sk->sk_state_change callback...
      f1d1c9fa
    • Linus Torvalds's avatar
      2ff55e98
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · daa94222
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        ACPI EC: remove redundant code
        ACPI: Add D3 cold state
        ACPI: processor: fix processor_physically_present in UP kernel
        ACPI: Split out custom_method functionality into an own driver
        ACPI: Cleanup custom_method debug stuff
        ACPI EC: enable MSI workaround for Quanta laptops
        ACPICA: Update to version 20110413
        ACPICA: Execute an orphan _REG method under the EC device
        ACPICA: Move ACPI_NUM_PREDEFINED_REGIONS to a more appropriate place
        ACPICA: Update internal address SpaceID for DataTable regions
        ACPICA: Add more methods eligible for NULL package element removal
        ACPICA: Split all internal Global Lock functions to new file - evglock
        ACPI: EC: add another DMI check for ASUS hardware
        ACPI EC: remove dead code
        ACPICA: Fix code divergence of global lock handling
        ACPICA: Use acpi_os_create_lock interface
        ACPI: osl, add acpi_os_create_lock interface
        ACPI:Fix goto flows in thermal-sys
      daa94222
    • Linus Torvalds's avatar
      Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 · f3106421
      Linus Torvalds authored
      * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
        x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param
        x86 idle: deprecate "no-hlt" cmdline param
        x86 idle APM: deprecate CONFIG_APM_CPU_IDLE
        x86 idle floppy: deprecate disable_hlt()
        x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it
        x86 idle: clarify AMD erratum 400 workaround
        idle governor: Avoid lock acquisition to read pm_qos before entering idle
        cpuidle: menu: fixed wrapping timers at 4.294 seconds
      f3106421
    • Al Viro's avatar
      cifs/ubifs: Fix shrinker API change fallout · ef1d5759
      Al Viro authored
      Commit 1495f230 ("vmscan: change shrinker API by passing
      shrink_control struct") changed the API of ->shrink(), but missed ubifs
      and cifs instances.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ef1d5759
    • Peter Zijlstra's avatar
      mm, rmap: Add yet more comments to page_get_anon_vma/page_lock_anon_vma · bc658c96
      Peter Zijlstra authored
      Inspired by an analysis from Hugh on why again all this doesn't explode
      in our face.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bc658c96
    • Mikulas Patocka's avatar
      dm kcopyd: return client directly and not through a pointer · fa34ce73
      Mikulas Patocka authored
      Return client directly from dm_kcopyd_client_create, not through a
      parameter, making it consistent with dm_io_client_create.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      fa34ce73
    • Mikulas Patocka's avatar
      dm kcopyd: reserve fewer pages · 5f43ba29
      Mikulas Patocka authored
      Reserve just the minimum of pages needed to process one job.
      
      Because we allocate pages from page allocator, we don't need to reserve
      a large number of pages.  The maximum job size is SUB_JOB_SIZE and we
      calculate the number of reserved pages based on this.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      5f43ba29
    • Mikulas Patocka's avatar
      dm io: use fixed initial mempool size · bda8efec
      Mikulas Patocka authored
      Replace the arbitrary calculation of an initial io struct mempool size
      with a constant.
      
      The code calculated the number of reserved structures based on the request
      size and used a "magic" multiplication constant of 4.  This patch changes
      it to reserve a fixed number - itself still chosen quite arbitrarily.
      Further testing might show if there is a better number to choose.
      
      Note that if there is no memory pressure, we can still allocate an
      arbitrary number of "struct io" structures.  One structure is enough to
      process the whole request.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      bda8efec
    • Mikulas Patocka's avatar
      dm kcopyd: alloc pages from the main page allocator · d0471458
      Mikulas Patocka authored
      This patch changes dm-kcopyd so that it allocates pages from the main
      page allocator with __GFP_NOWARN | __GFP_NORETRY flags (so that it can
      fail in case of memory pressure). If the allocation fails, dm-kcopyd
      allocates pages from its own reserve.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      d0471458
    • Mikulas Patocka's avatar
      dm kcopyd: add gfp parm to alloc_pl · f99b55ee
      Mikulas Patocka authored
      Introduce a parameter for gfp flags to alloc_pl() for use in following
      patches.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      f99b55ee
    • Mikulas Patocka's avatar
      dm kcopyd: remove superfluous page allocation spinlock · 4cc1b4cf
      Mikulas Patocka authored
      Remove the spinlock protecting the pages allocation.  The spinlock is only
      taken on initialization or from single-threaded workqueue.  Therefore, the
      spinlock is useless.
      
      The spinlock is taken in kcopyd_get_pages and kcopyd_put_pages.
      
      kcopyd_get_pages is only called from run_pages_job, which is only
      called from process_jobs called from do_work.
      
      kcopyd_put_pages is called from client_alloc_pages (which is initialization
      function) or from run_complete_job. run_complete_job is only called from
      process_jobs called from do_work.
      
      Another spinlock, kc->job_lock is taken each time someone pushes or pops
      some work for the worker thread.  Once we take kc->job_lock, we
      guarantee that any written memory is visible to the other CPUs.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      4cc1b4cf
    • Mikulas Patocka's avatar
      dm kcopyd: preallocate sub jobs to avoid deadlock · c6ea41fb
      Mikulas Patocka authored
      There's a possible theoretical deadlock in dm-kcopyd because multiple
      allocations from the same mempool are required to finish a request.
      Avoid this by preallocating sub jobs.
      
      There is a mempool of 512 entries. Each request requires up to 9
      entries from the mempool. If we have at least 57 concurrent requests
      running, the mempool may overflow and mempool allocations may start
      blocking until another entry is freed to the mempool. Because the same
      thread is used to free entries to the mempool and allocate entries from
      the mempool, this may result in a deadlock.
      
      This patch changes it so that one mempool entry contains all 9 "struct
      kcopyd_job" required to fulfill the whole request. The allocation is
      done only once in dm_kcopyd_copy and no further mempool allocations are
      done during request processing.
      
      If dm_kcopyd_copy is not run in the completion thread, this
      implementation is deadlock-free.
      
      MIN_JOBS needs reducing accordingly and we've chosen to reduce it
      further to 8.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      c6ea41fb
    • Mikulas Patocka's avatar
      dm kcopyd: avoid pointless job splitting · a705a34a
      Mikulas Patocka authored
      Don't split SUB_JOB_SIZE jobs
      
      If the job size equals SUB_JOB_SIZE, there is no point in splitting it.
      Splitting it just unnecessarily wastes time, because the split job size
      is SUB_JOB_SIZE too.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      a705a34a
    • Martin K. Petersen's avatar
      dm mpath: do not fail paths after integrity errors · 6f13f6fb
      Martin K. Petersen authored
      Integrity errors need to be passed to the owner of the integrity
      metadata for processing. Consequently EILSEQ should be passed up the
      stack.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      6f13f6fb
    • Milan Broz's avatar
      dm table: reject devices without request fns · f4808ca9
      Milan Broz authored
      This patch adds a check that a block device has a request function
      defined before it is used.  Otherwise, misconfiguration can cause an oops.
      
      Because we are allowing devices with zero size e.g. an offline multipath
      device as in commit 2cd54d9b
      ("dm: allow offline devices") there needs to be an additional check
      to ensure devices are initialised.  Some block devices, like a loop
      device without a backing file, exist but have no request function.
      
      Reproducer is trivial: dm-mirror on unbound loop device
      (no backing file on loop devices)
      
      dmsetup create x --table "0 8 mirror core 2 8 sync 2 /dev/loop0 0 /dev/loop1 0"
      
      and mirror resync will immediatelly cause OOps.
      
      BUG: unable to handle kernel NULL pointer dereference at   (null)
       ? generic_make_request+0x2bd/0x590
       ? kmem_cache_alloc+0xad/0x190
       submit_bio+0x53/0xe0
       ? bio_add_page+0x3b/0x50
       dispatch_io+0x1ca/0x210 [dm_mod]
       ? read_callback+0x0/0xd0 [dm_mirror]
       dm_io+0xbb/0x290 [dm_mod]
       do_mirror+0x1e0/0x748 [dm_mirror]
      Signed-off-by: default avatarMilan Broz <mbroz@redhat.com>
      Reported-by: default avatarZdenek Kabelac <zkabelac@redhat.com>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      f4808ca9
    • Mike Snitzer's avatar
      dm table: allow targets to support discards internally · 4c259327
      Mike Snitzer authored
      Permit a target to support discards regardless of whether or not all its
      underlying devices do.
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      4c259327
    • Heiko Carstens's avatar
      [S390] mm: fix mmu_gather rework · 3c5cffb6
      Heiko Carstens authored
      Quite a few functions that get called from the tlb gather code require that
      preemption must be disabled. So disable preemption inside of the called
      functions instead.
      The only drawback is that rcu_table_freelist_finish() doesn't get necessarily
      called on the cpu(s) that filled the free lists. So we may see a delay, until
      we finally see an rcu callback. However over time this shouldn't matter.
      
      So we get rid of lots of "BUG: using smp_processor_id() in preemptible"
      messages.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      3c5cffb6
    • Heiko Carstens's avatar
      [S390] mm: fix storage key handling · a43a9d93
      Heiko Carstens authored
      page_get_storage_key() and page_set_storage_key() expect a page address
      and not its page frame number. This got inconsistent with 2d42552d
      "[S390] merge page_test_dirty and page_clear_dirty".
      
      Result is that we read/write storage keys from random pages and do not
      have a working dirty bit tracking at all.
      E.g. SetPageUpdate() doesn't clear the dirty bit of requested pages, which
      for example ext4 doesn't like very much and panics after a while.
      
      Unable to handle kernel paging request at virtual user address (null)
      Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      Modules linked in:
      CPU: 1 Not tainted 2.6.39-07551-g139f37f5-dirty #152
      Process flush-94:0 (pid: 1576, task: 000000003eb34538, ksp: 000000003c287b70)
      Krnl PSW : 0704c00180000000 0000000000316b12 (jbd2_journal_file_inode+0x10e/0x138)
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
      Krnl GPRS: 0000000000000000 0000000000000000 0000000000000000 0700000000000000
                 0000000000316a62 000000003eb34cd0 0000000000000025 000000003c287b88
                 0000000000000001 000000003c287a70 000000003f1ec678 000000003f1ec000
                 0000000000000000 000000003e66ec00 0000000000316a62 000000003c287988
      Krnl Code: 0000000000316b04: f0a0000407f4       srp     4(11,%r0),2036,0
                 0000000000316b0a: b9020022           ltgr    %r2,%r2
                 0000000000316b0e: a7740015           brc     7,316b38
                >0000000000316b12: e3d0c0000024       stg     %r13,0(%r12)
                 0000000000316b18: 4120c010           la      %r2,16(%r12)
                 0000000000316b1c: 4130d060           la      %r3,96(%r13)
                 0000000000316b20: e340d0600004       lg      %r4,96(%r13)
                 0000000000316b26: c0e50002b567       brasl   %r14,36d5f4
      Call Trace:
      ([<0000000000316a62>] jbd2_journal_file_inode+0x5e/0x138)
       [<00000000002da13c>] mpage_da_map_and_submit+0x2e8/0x42c
       [<00000000002daac2>] ext4_da_writepages+0x2da/0x504
       [<00000000002597e8>] writeback_single_inode+0xf8/0x268
       [<0000000000259f06>] writeback_sb_inodes+0xd2/0x18c
       [<000000000025a700>] writeback_inodes_wb+0x80/0x168
       [<000000000025aa92>] wb_writeback+0x2aa/0x324
       [<000000000025abde>] wb_do_writeback+0xd2/0x274
       [<000000000025ae3a>] bdi_writeback_thread+0xba/0x1c4
       [<00000000001737be>] kthread+0xa6/0xb0
       [<000000000056c1da>] kernel_thread_starter+0x6/0xc
       [<000000000056c1d4>] kernel_thread_starter+0x0/0xc
      INFO: lockdep is turned off.
      Last Breaking-Event-Address:
       [<0000000000316a8a>] jbd2_journal_file_inode+0x86/0x138
      Reported-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      a43a9d93
    • Phillip Lougher's avatar
      Squashfs: Fix sanity check patches on big-endian systems · d5b72ce1
      Phillip Lougher authored
      le64 values should be swapped when accessing on
      big-endian systems.
      Signed-off-by: default avatarPhillip Lougher <phillip@lougher.demon.co.uk>
      d5b72ce1
    • Len Brown's avatar
      Merge branch 'ec-cleanup' into release · 751516f0
      Len Brown authored
      Conflicts:
      	drivers/platform/x86/compal-laptop.c
      751516f0
    • Len Brown's avatar
      Merge branches 'acpica', 'aml-custom', 'bugzilla-16548', 'bugzilla-20242',... · 6288cf1e
      Len Brown authored
      Merge branches 'acpica', 'aml-custom', 'bugzilla-16548', 'bugzilla-20242', 'd3-cold', 'ec-asus' and 'thermal-fix' into release
      6288cf1e
    • Len Brown's avatar
      x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param · 5d4c47e0
      Len Brown authored
      mwait_idle() is a C1-only idle loop intended to be more efficient
      than HLT on SMP hardware that supports it.
      
      But mwait_idle() has been replaced by the more general
      mwait_idle_with_hints(), which handles both C1 and deeper C-states.
      ACPI uses only mwait_idle_with_hints(), and never uses mwait_idle().
      
      Deprecate mwait_idle() and the "idle=mwait" cmdline param
      to simplify the x86 idle code.
      
      After this change, kernels configured with
      (!CONFIG_ACPI=n && !CONFIG_INTEL_IDLE=n) when run on hardware
      that support MWAIT will simply use HLT.  If MWAIT is desired
      on those systems, cpuidle and the cpuidle drivers above
      can be used.
      
      cc: x86@kernel.org
      cc: stable@kernel.org # .39.x
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5d4c47e0
    • Len Brown's avatar
      x86 idle: deprecate "no-hlt" cmdline param · cdaab4a0
      Len Brown authored
      We'd rather that modern machines not check if HLT works on
      every entry into idle, for the benefit of machines that had
      marginal electricals 15-years ago.  If those machines are still running
      the upstream kernel, they can use "idle=poll".  The only difference
      will be that they'll now invoke HLT in machine_hlt().
      
      cc: x86@kernel.org # .39.x
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      cdaab4a0
    • Len Brown's avatar
      x86 idle APM: deprecate CONFIG_APM_CPU_IDLE · 99c63221
      Len Brown authored
      We don't want to export the pm_idle function pointer to modules.
      Currently CONFIG_APM_CPU_IDLE w/ CONFIG_APM_MODULE forces us to.
      
      CONFIG_APM_CPU_IDLE is of dubious value, it runs only on 32-bit
      uniprocessor laptops that are over 10 years old.  It calls into
      the BIOS during idle, and is known to cause a number of machines
      to fail.
      
      Removing CONFIG_APM_CPU_IDLE and will allow us to stop exporting
      pm_idle.  Any systems that were calling into the APM BIOS
      at run-time will simply use HLT instead.
      
      cc: x86@kernel.org
      cc: Jiri Kosina <jkosina@suse.cz>
      cc: stable@kernel.org # .39.x
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      99c63221
    • Len Brown's avatar
      x86 idle floppy: deprecate disable_hlt() · 3b70b2e5
      Len Brown authored
      Plan to remove floppy_disable_hlt in 2012, an ancient
      workaround with comments that it should be removed.
      
      This allows us to remove clutter and a run-time branch
      from the idle code.
      
      WARN_ONCE() on invocation until it is removed.
      
      cc: x86@kernel.org
      cc: stable@kernel.org # .39.x
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      3b70b2e5
    • Len Brown's avatar
      x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it · 06ae40ce
      Len Brown authored
      In the long run, we don't want default_idle() or (pm_idle)() to
      be exported outside of process.c.  Start by not exporting them
      to modules, unless the APM build demands it.
      
      cc: x86@kernel.org
      cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      06ae40ce
    • Len Brown's avatar
      x86 idle: clarify AMD erratum 400 workaround · 02c68a02
      Len Brown authored
      The workaround for AMD erratum 400 uses the term "c1e" falsely suggesting:
      1. Intel C1E is somehow involved
      2. All AMD processors with C1E are involved
      
      Use the string "amd_c1e" instead of simply "c1e" to clarify that
      this workaround is specific to AMD's version of C1E.
      Use the string "e400" to clarify that the workaround is specific
      to AMD processors with Erratum 400.
      
      This patch is text-substitution only, with no functional change.
      
      cc: x86@kernel.org
      Acked-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      02c68a02
    • Zhang Rui's avatar
      ACPI EC: remove redundant code · 08b53f0e
      Zhang Rui authored
      ec->handle is set in ec_parse_device(), so don't bother to set it again.
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      08b53f0e
    • Lin Ming's avatar
      ACPI: Add D3 cold state · 28c2103d
      Lin Ming authored
      _SxW returns an Integer containing the lowest D-state supported in state
      Sx. If OSPM has not indicated that it supports _PR3, then the value “3”
      corresponds to D3.  If it has indicated _PR3 support, the value “3”
      represents D3hot and the value “4” represents D3cold.
      
      Linux does set _OSC._PR3, so we should fix it to expect that _SxW can
      return 4.
      Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      28c2103d
    • Lin Ming's avatar
      ACPI: processor: fix processor_physically_present in UP kernel · 932df741
      Lin Ming authored
      Usually, there are multiple processors defined in ACPI table, for
      example
      
          Scope (_PR)
          {
              Processor (CPU0, 0x00, 0x00000410, 0x06) {}
              Processor (CPU1, 0x01, 0x00000410, 0x06) {}
              Processor (CPU2, 0x02, 0x00000410, 0x06) {}
              Processor (CPU3, 0x03, 0x00000410, 0x06) {}
          }
      
      processor_physically_present(...) will be called to check whether those
      processors are physically present.
      
      Currently we have below codes in processor_physically_present,
      
      cpuid = acpi_get_cpuid(...);
      if ((cpuid == -1) && (num_possible_cpus() > 1))
              return false;
      return true;
      
      In UP kernel, acpi_get_cpuid(...) always return -1 and
      num_possible_cpus() always return 1, so
      processor_physically_present(...) always returns true for all passed in
      processor handles.
      
      This is wrong for UP processor or SMP processor running UP kernel.
      
      This patch removes the !SMP version of acpi_get_cpuid(), so both UP and
      SMP kernel use the same acpi_get_cpuid function.
      
      And for UP kernel, only processor 0 is valid.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=16548
      https://bugzilla.kernel.org/show_bug.cgi?id=16357Tested-by: default avatarAnton Kochkov <anton.kochkov@gmail.com>
      Tested-by: default avatarAmbroz Bizjak <ambrop7@gmail.com>
      Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      932df741
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin · 139f37f5
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
        Blackfin: debug-mmrs: include RSI_PID[4567] MMRs
        Blackfin: bf51x: fix up RSI_PID# MMR defines
        Blackfin: bf52x/bf54x: fix up usb MMR defines
        Blackfin: debug-mmrs: fix typos with gptimers/mdma/ppi
        Blackfin: gptimers: add structure for hardware register layout
        Blackfin: wire up new sendmmsg syscall
        Blackfin: mach/bfin_serial_5xx.h: punt now-unused header
        Blackfin: bfin_serial.h: turn default port wrappers into stubs
      139f37f5