1
0
Fork 0
Commit Graph

781221 Commits (53a01c9a5fcf74b7f855e70dd69742fb3cb84c83)

Author SHA1 Message Date
Huang Ying 59d98bf3c2 mm: swap: add comments to lock_cluster_or_swap_info()
Patch series "swap: THP optimizing refactoring", v4.

Now the THP (Transparent Huge Page) swap optimizing is implemented in the
way like below,

  #ifdef CONFIG_THP_SWAP
  huge_function(...)
  {
  }
  #else
  normal_function(...)
  {
  }
  #endif

  general_function(...)
  {
  	if (huge)
  		return thp_function(...);
	else
  		return normal_function(...);
  }

As pointed out by Dave Hansen, this will,

1. Create a new, wholly untested code path for huge page
2. Create two places to patch bugs
3. Are not reusing code when possible

This patchset is to address these problems via merging huge/normal code
path/functions if possible.

One concern is that this may cause code size to dilate when
!CONFIG_TRANSPARENT_HUGEPAGE.  The data shows that most refactoring will
only cause quite slight code size increase.

This patch (of 8):

To improve code readability.

Link: http://lkml.kernel.org/r/20180720071845.17920-2-ying.huang@intel.com
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Suggested-and-acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:43 -07:00
Kirill Tkhai e50ef89b0f mm: struct shrinker: make flags of unsigned type
Currently, there are two flags only, so unsigned is more then enough.
Also, move int seeks to keep these fields together.

Link: http://lkml.kernel.org/r/153199748720.21131.6476256940113102483.stgit@localhost.localdomain
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:43 -07:00
Kirill Tkhai 92be775a3d mm: struct shrink_control: keep int fields together
Patch series "Reorderings in struct shrinker and struct shrink_control".

These structures are intensively used during reclaim and, displace other
data in cache, so there is no a reason they have int fields not grouped
together.

This patch (of 2):

gfp_t is of unsigned type, so let's move nid to keep them together.

Link: http://lkml.kernel.org/r/153199747930.21131.861043607301997810.stgit@localhost.localdomain
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:43 -07:00
Kirill Tkhai 8df4a44cc4 mm: check shrinker is memcg-aware in register_shrinker_prepared()
There is a sad BUG introduced in patch adding SHRINKER_REGISTERING.
shrinker_idr business is only for memcg-aware shrinkers.  Only such type
of shrinkers have id and they must be finaly installed via idr_replace()
in this function.  For !memcg-aware shrinkers we never initialize
shrinker->id field.

But there are all types of shrinkers passed to idr_replace(), and every
!memcg-aware shrinker with random ID (most probably, its id is 0)
replaces memcg-aware shrinker pointed by the ID in IDR.

This patch fixes the problem.

Link: http://lkml.kernel.org/r/8ff8a793-8211-713a-4ed9-d6e52390c2fc@virtuozzo.com
Fixes: 7e010df53c "mm: use special value SHRINKER_REGISTERING instead of list_empty() check"
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Reported-by: <syzbot+d5f648a1bfe15678786b@syzkaller.appspotmail.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Josef Bacik <jbacik@fb.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: <syzkaller-bugs@googlegroups.com>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:43 -07:00
Ian Kent 0633da48f0 autofs: fix autofs_sbi() does not check super block type
autofs_sbi() does not check the superblock magic number to verify it has
been given an autofs super block.

Link: http://lkml.kernel.org/r/153475422934.17131.7563724552005298277.stgit@pluto.themaw.net
Reported-by: <syzbot+87c3c541582e56943277@syzkaller.appspotmail.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:43 -07:00
Paolo Bonzini 0027ff2a75 KVM: VMX: fixes for vmentry_l1d_flush module parameter
Two bug fixes:

1) missing entries in the l1d_param array; this can cause a host crash
if an access attempts to reach the missing entry. Future-proof the get
function against any overflows as well.  However, the two entries
VMENTER_L1D_FLUSH_EPT_DISABLED and VMENTER_L1D_FLUSH_NOT_REQUIRED must
not be accepted by the parse function, so disable them there.

2) invalid values must be rejected even if the CPU does not have the
bug, so test for them before checking boot_cpu_has(X86_BUG_L1TF)

... and a small refactoring, since the .cmd field is redundant with
the index in the array.

Reported-by: Bandan Das <bsd@redhat.com>
Cc: stable@vger.kernel.org
Fixes: a7b9020b06
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:39 +02:00
Peter Xu 3b4cd0ff54 kvm: selftest: add dirty logging test
Test KVM dirty logging functionality.

The test creates a standalone memory slot to test tracking the dirty
pages since we can't really write to the default memory slot which still
contains the guest ELF image.

We have two threads running during the test:

(1) the vcpu thread continuously dirties random guest pages by writting
    a iteration number to the first 8 bytes of the page

(2) the host thread continuously fetches dirty logs for the testing
    memory region and verify each single bit of the dirty bitmap by
    checking against the values written onto the page

Note that since the guest cannot calls the general userspace APIs like
random(), it depends on the host to provide random numbers for the
page indexes to dirty.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:39 +02:00
Peter Xu aee41be593 kvm: selftest: pass in extra memory when create vm
This information can be used to decide the size of the default memory
slot, which will need to cover the extra pages with page tables.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:38 +02:00
Peter Xu bc8eb2fe2e kvm: selftest: include the tools headers
Let the kvm selftest include the tools headers, then we can start to use
things there like bitmap operations.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:38 +02:00
Peter Xu 4e18bccc2e kvm: selftest: unify the guest port macros
Most of the tests are using the same way to do guest to host sync but
the code is mostly duplicated.  Generalize the guest port macros into
the common header file and use it in different tests.

Meanwhile provide "struct guest_args" and a helper "guest_args_read()"
to hide the register details when playing with these port operations on
RDI and RSI.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:37 +02:00
Peter Xu 07a262cc7c tools: introduce test_and_clear_bit
We have test_and_set_bit but not test_and_clear_bit.  Add it.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:36 +02:00
Thomas Gleixner 024d83cadc KVM: x86: SVM: Call x86_spec_ctrl_set_guest/host() with interrupts disabled
Mikhail reported the following lockdep splat:

WARNING: possible irq lock inversion dependency detected
CPU 0/KVM/10284 just changed the state of lock:
  000000000d538a88 (&st->lock){+...}, at:
  speculative_store_bypass_update+0x10b/0x170

but this lock was taken by another, HARDIRQ-safe lock
in the past:

(&(&sighand->siglock)->rlock){-.-.}

   and interrupts could create inverse lock ordering between them.

Possible interrupt unsafe locking scenario:

    CPU0                    CPU1
    ----                    ----
   lock(&st->lock);
                           local_irq_disable();
                           lock(&(&sighand->siglock)->rlock);
                           lock(&st->lock);
    <Interrupt>
     lock(&(&sighand->siglock)->rlock);
     *** DEADLOCK ***

The code path which connects those locks is:

   speculative_store_bypass_update()
   ssb_prctl_set()
   do_seccomp()
   do_syscall_64()

In svm_vcpu_run() speculative_store_bypass_update() is called with
interupts enabled via x86_virt_spec_ctrl_set_guest/host().

This is actually a false positive, because GIF=0 so interrupts are
disabled even if IF=1; however, we can easily move the invocations of
x86_virt_spec_ctrl_set_guest/host() into the interrupt disabled region to
cure it, and it's a good idea to keep the GIF=0/IF=1 area as small
and self-contained as possible.

Fixes: 1f50ddb4f4 ("x86/speculation: Handle HT correctly on AMD")
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: kvm@vger.kernel.org
Cc: x86@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:36 +02:00
Sean Christopherson 0b665d3040 KVM: vmx: Inject #UD for SGX ENCLS instruction in guest
Virtualization of Intel SGX depends on Enclave Page Cache (EPC)
management that is not yet available in the kernel, i.e. KVM support
for exposing SGX to a guest cannot be added until basic support
for SGX is upstreamed, which is a WIP[1].

Until SGX is properly supported in KVM, ensure a guest sees expected
behavior for ENCLS, i.e. all ENCLS #UD.  Because SGX does not have a
true software enable bit, e.g. there is no CR4.SGXE bit, the ENCLS
instruction can be executed[1] by the guest if SGX is supported by the
system.  Intercept all ENCLS leafs (via the ENCLS- exiting control and
field) and unconditionally inject #UD.

[1] https://www.spinics.net/lists/kvm/msg171333.html or
    https://lkml.org/lkml/2018/7/3/879

[2] A guest can execute ENCLS in the sense that ENCLS will not take
    an immediate #UD, but no ENCLS will ever succeed in a guest
    without explicit support from KVM (map EPC memory into the guest),
    unless KVM has a *very* egregious bug, e.g. accidentally mapped
    EPC memory into the guest SPTEs.  In other words this patch is
    needed only to prevent the guest from seeing inconsistent behavior,
    e.g. #GP (SGX not enabled in Feature Control MSR) or #PF (leaf
    operand(s) does not point at EPC memory) instead of #UD on ENCLS.
    Intercepting ENCLS is not required to prevent the guest from truly
    utilizing SGX.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20180814163334.25724-3-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:35 +02:00
Sean Christopherson 802ec46167 KVM: vmx: Add defines for SGX ENCLS exiting
Hardware support for basic SGX virtualization adds a new execution
control (ENCLS_EXITING), VMCS field (ENCLS_EXITING_BITMAP) and exit
reason (ENCLS), that enables a VMM to intercept specific ENCLS leaf
functions, e.g. to inject faults when the VMM isn't exposing SGX to
a VM.  When ENCLS_EXITING is enabled, the VMM can set/clear bits in
the bitmap to intercept/allow ENCLS leaf functions in non-root, e.g.
setting bit 2 in the ENCLS_EXITING_BITMAP will cause ENCLS[EINIT]
to VMExit(ENCLS).

Note: EXIT_REASON_ENCLS was previously added by commit 1f51999270
("KVM: VMX: add missing exit reasons").

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20180814163334.25724-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:35 +02:00
Yi Wang d806afa495 x86/kvm/vmx: Fix coding style in vmx_setup_l1d_flush()
Substitute spaces with tab. No functional changes.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
Message-Id: <1534398159-48509-1-git-send-email-wang.yi59@zte.com.cn>
Cc: stable@vger.kernel.org # L1TF
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:34 +02:00
Arnd Bergmann 7288bde1f9 x86: kvm: avoid unused variable warning
Removing one of the two accesses of the maxphyaddr variable led to
a harmless warning:

arch/x86/kvm/x86.c: In function 'kvm_set_mmio_spte_mask':
arch/x86/kvm/x86.c:6563:6: error: unused variable 'maxphyaddr' [-Werror=unused-variable]

Removing the #ifdef seems to be the nicest workaround, as it
makes the code look cleaner than adding another #ifdef.

Fixes: 28a1f3ac1d ("kvm: x86: Set highest physical address bits in non-present/reserved SPTEs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org # L1TF
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:26 +02:00
Linus Torvalds df2def49c5 More ACPI updates for 4.19-rc1
- Update the ACPICA code in the kernel to upstream revision 20180810
    including:
    * Fix for AML parser regression causing it to mishandle opcodes
      that open a scope upon parse failures (Erik Schmauss).
    * Fix for a reference counting issue on large systems (Erik
      Schmauss).
    * Fix to discard values coming from register reads that have
      failed (Erik Schmauss).
    * Two acpiexec fixes (Bob Moore, Erik Schmauss).
    * Debugger cleanup (Bob Moore).
    * Cleanup of duplicate table error message (Bob Moore).
    * Cleanup of hex detection in the utilities (Erik Schmauss).
 
  - Make ACPICA clear the status of all ACPI events when entering
    sleep states again to avoid functional regressions (Rafael Wysocki).
 
  - Update the ACPI operation region driver for the CrystalCove PMIC
    to cover all of the known operation region fields (Hans de Goede).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJbfSp2AAoJEILEb/54YlRxH1cQAJax3bEtxG9IK6kuQW1jvwde
 TIIvmVR2U45Wz5t69njKp9zetNzIwSU6vkjenimUJa8EuajclJx3ucfIV6dqWFbr
 0efJO4wmo+3/ElGzXHU4xSF1z09xx4PBcZaOtoEzX/5zLNdy2sFY7T8iwlmAPNOs
 vCbvBcCSffkciP6e22og9i1+p73JKNYA75S2Fb2rQZDdidN1q2iGlq5B2ToKvCas
 +BJmqCuwStR1/gAYAdWC940s/rkzi5Kig6xum/EtIz1dgWVkwxIHUe6FZ0BSsv8c
 VBINqhLgEix2Rrnd+pRYdB8klrP3GmPEELQykV9qkpCKNKUgU4t0wBxjw8uW27sv
 ovrCULlrRYckIOSp/D+M1z7NRB3kekCKg340kz2cGdRo8xf1Dxj8w+P6Ca1yfAWt
 HBBBgb2utJWG4vm7raLjAlnHKi15MN8J01wz0cjmLRB/+mGPMwzQ6Jxon9SwjWBD
 qn7uGpIDDS3DjMwBxHXS4Vr4Fx8BftXeK6MB72vOXN4n0f+zArCqTLAf6+t9aASq
 50VaSDfc8PJO8wl9GvyHaTedci6/iqORDTR9XHK3njfEr1j2uRhtfHUVUIvLDILT
 HqfYbFqq63qaaFLiUhB3UBfsr6BL4sSUmuY31kL9xXLzZGmTvkoB6P+ysjTvF18V
 +mcZdZ62o18NA1BXO8iH
 =g8r+
 -----END PGP SIGNATURE-----

Merge tag 'acpi-4.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki:
 "These update the ACPICA code in the kernel to the most recent upstream
  revision (which includes a regression fix and other improvements),
  make ACPICA clear the status of all ACPI events when entering sleep
  states (to restore the previous behavior) and update the ACPI
  operation region driver for the CrystalCove PMIC.

  Specifics:

   - Update the ACPICA code in the kernel to upstream revision 20180810
     including:
      * Fix for AML parser regression causing it to mishandle opcodes
        that open a scope upon parse failures (Erik Schmauss)
      * Fix for a reference counting issue on large systems (Erik
        Schmauss)
      * Fix to discard values coming from register reads that have
        failed (Erik Schmauss)
      * Two acpiexec fixes (Bob Moore, Erik Schmauss)
      * Debugger cleanup (Bob Moore)
      * Cleanup of duplicate table error message (Bob Moore)
      * Cleanup of hex detection in the utilities (Erik Schmauss)

   - Make ACPICA clear the status of all ACPI events when entering sleep
     states again to avoid functional regressions (Rafael Wysocki)

   - Update the ACPI operation region driver for the CrystalCove PMIC to
     cover all of the known operation region fields (Hans de Goede)"

* tag 'acpi-4.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PMIC: CrystalCove: Extend PMOP support to support all possible fields
  ACPICA: Clear status of all events when entering sleep states
  ACPICA: Update version to 20180810
  ACPICA: acpiexec: fix a small memory leak regression
  ACPICA: Reference Counts: increase max to 0x4000 for large servers
  ACPICA: Reference count: add additional debugging details
  ACPICA: acpi_exec: fixing -fi option
  ACPICA: Debugger: Cleanup interface to the AML disassembler
  ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
  ACPICA: Utilities: split hex detection into smaller functions
  ACPICA: Update an error message for a duplicate table
  ACPICA: ACPICA: add status check for acpi_hw_read before assigning return value
  ACPICA: AML Parser: ignore all exceptions resulting from incorrect AML during table load
2018-08-22 07:44:50 -07:00
Linus Torvalds dfec4a8478 More power management updates for 4.19-rc1
- Make the idle loop handle stopped scheduler tick correctly (Rafael
    Wysocki).
 
  - Prevent the menu cpuidle governor from letting CPUs spend too much
    time in shallow idle states when it is invoked with scheduler tick
    stopped and clean it up somewhat (Rafael Wysocki).
 
  - Avoid invoking the platform firmware to make the platform enter
    the ACPI S3 sleep state with suspended PCIe root ports which may
    confuse the firmware and cause it to crash (Rafael Wysocki).
 
  - Fix sysfs-related race in the ondemand and conservative cpufreq
    governors which may cause the system to crash if the governor
    module is removed during an update of CPU frequency limits (Henry
    Willard).
 
  - Select SRCU when building the system wakeup framework to avoid a
    build issue in it (zhangyi).
 
  - Make the descriptions of ACPI C-states vendor-neutral to avoid
    confusion (Prarit Bhargava).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJbfSnVAAoJEILEb/54YlRxBn4QAKQ8PqkSYkBby+1hb90ET4dk
 VaLkbCYXuzLK5rIDvnbYOALhVKo4B29Ex5GdCLN7cWkZMkrVKe7oX8QQTnp3/7lF
 URjTKgTNec5uJG652PrE3ESAa3X/kYggj6aeQOxDR4iYKzcpJEQ92ekFW+SoJTNp
 Jc2kZh3qkC2On64GB3ibsZaKnmHfPvLg0t4agwzuYq/Gff8NRJFk7kMwAPzqGzZo
 b2UVRcYFWIRkJjgmU9iInoeHIY8mBdT3IiKwTemZP1dOhb5T1AHOXwGTk6/cS+RH
 A9qx4eg7I3R00KmnYvO8WytYJeOu2qb83GIUx4fIJGOqfvevm5xkxB9F+nfE+ouj
 ROBqO4+X4XfQGPw8slayg0rJjI9JSkXLnLdl0Qw2WRlbc4/fVWntra1C57EeKFBR
 EG9UAF9+7nUUx0bOCLsfFF3+r9R3SDUjk7b4thyhYncyQRsYC+FL7ztlxnMzVtzW
 M5SF2sPrpcQzqmcszdUdbESI10n5X8m/crJW4rsbTxBpAM+coO+uLcvHWOY4MpkW
 BgBsR6bMDAlG/VlTFgeeP/tkCRd5zNlJi7yBFItXuOoVKXpnHCJuxq2WkZ1Rb74M
 Gk1d3TduekHJm8VsLEdCJR/tEk1cMc0zVUD/a1yzI4Z21QxvXUCqMDdws4/Ey184
 qmKgNR9R94vSC5xIPRhM
 =9GrU
 -----END PGP SIGNATURE-----

Merge tag 'pm-4.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 "These fix the main idle loop and the menu cpuidle governor, clean up
  the latter, fix a mistake in the PCI bus type's support for system
  suspend and resume, fix the ondemand and conservative cpufreq
  governors, address a build issue in the system wakeup framework and
  make the ACPI C-states desciptions less confusing.

  Specifics:

   - Make the idle loop handle stopped scheduler tick correctly (Rafael
     Wysocki).

   - Prevent the menu cpuidle governor from letting CPUs spend too much
     time in shallow idle states when it is invoked with scheduler tick
     stopped and clean it up somewhat (Rafael Wysocki).

   - Avoid invoking the platform firmware to make the platform enter the
     ACPI S3 sleep state with suspended PCIe root ports which may
     confuse the firmware and cause it to crash (Rafael Wysocki).

   - Fix sysfs-related race in the ondemand and conservative cpufreq
     governors which may cause the system to crash if the governor
     module is removed during an update of CPU frequency limits (Henry
     Willard).

   - Select SRCU when building the system wakeup framework to avoid a
     build issue in it (zhangyi).

   - Make the descriptions of ACPI C-states vendor-neutral to avoid
     confusion (Prarit Bhargava)"

* tag 'pm-4.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpuidle: menu: Handle stopped tick more aggressively
  sched: idle: Avoid retaining the tick when it has been stopped
  PCI / ACPI / PM: Resume all bridges on suspend-to-RAM
  cpuidle: menu: Update stale polling override comment
  cpufreq: governor: Avoid accessing invalid governor_data
  x86/ACPI/cstate: Make APCI C1 FFH MWAIT C-state description vendor-neutral
  cpuidle: menu: Fix white space
  PM / sleep: wakeup: Fix build error caused by missing SRCU support
2018-08-22 07:42:36 -07:00
Linus Torvalds 159127ea83 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE updates from David Miller:

 - Remove redundant variables (Colin Ian King)

 - Expected switch fall-through annotations (Gustavo A. R. Silva)

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  ide: mark expected switch fall-throughs
  ide-tape: remove redundant variable buffer_size
  ide: remove redundant variables queue_run_ms and left
2018-08-22 07:40:33 -07:00
Linus Torvalds 9617ba395f Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc updates from David Miller:
 "Nothing super serious:

   - Convert sparc32 over to NO_BOOTMEM (Mike Rapoport)

   - Use dma_noncoherent_ops on sparc32 (Christoph Hellwig)

   - Fix kbuild defconfig handling on sparc32 (Masahiro Yamada)"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: fix KBUILD_DEFCONFIG for ARCH=sparc32
  sparc32: split ramdisk detection and reservation to a helper function
  sparc32: switch to NO_BOOTMEM
  sparc: mm/init_32: kill trailing whitespace
  sparc: use generic dma_noncoherent_ops
2018-08-22 07:38:21 -07:00
Linus Torvalds 20a9e57a09 arch/h8300 update.
-----BEGIN PGP SIGNATURE-----
 
 iHkEABECADkWIQSgYnFi3j8cJth9/dOC7L743CGq0QUCW31aihsceXNhdG9AdXNl
 cnMuc291cmNlZm9yZ2UuanAACgkQguy++NwhqtGezQCdG6IcJORiacpzVVw5AsTv
 fsRTS8EAniU8F/lw0LlF77eyJzGP9Fa5ZJ8y
 =TN4Q
 -----END PGP SIGNATURE-----

Merge tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux

Pull arch/h8300 updates from Yoshinori Sato.

* tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
  h8300: fix IRQ no
  arch/h8300: add a defconfig target
  arch/h8300: eliminate kgbd.c warning
  arch/h8300: eliminate ptrace.h warnings
  h8300:let the checker know that size_t is ulong
  h8300: Don't include linux/kernel.h in asm/atomic.h
  h8300: remove unnecessary of_platform_populate call
  h8300: Correct signature of test_bit()
  h8300: irqchip: fix warning
  h8300: switch to NO_BOOTMEM
  h8300: gcc-8.1 fix
  h8300: Add missing output register.
2018-08-22 06:24:26 -07:00
Dongjiu Geng 688e0581db KVM: Documentation: rename the capability of KVM_CAP_ARM_SET_SERROR_ESR
In the documentation description, this capability's name is
KVM_CAP_ARM_SET_SERROR_ESR, but in the header file this
capability's name is KVM_CAP_ARM_INJECT_SERROR_ESR, so change
the documentation description to make it same.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Reported-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 14:08:05 +02:00
Paolo Bonzini 631989303b KVM/arm updates for 4.19
- Support for Group0 interrupts in guests
 - Cache management optimizations for ARMv8.4 systems
 - Userspace interface for RAS, allowing error retrival and injection
 - Fault path optimization
 - Emulated physical timer fixes
 - Random cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAltxmb4VHG1hcmMuenlu
 Z2llckBhcm0uY29tAAoJECPQ0LrRPXpD7E0P/0qn1IMtskaC7EglFCm72+NXe1CW
 ZAtxTHzetjf7977dA3bVsg4gEKvVx5b3YuRT76u4hBoSa0rFJ8Q9iSC8wL4u9Idf
 JUQjwVIUxMeGW5fR0VFDkd9SkDYtNGdjQcVl2I8UpV+lnLC/2Vfr4xR5qBad2pAQ
 zjthdpQMjZWClyhPkOv6WjVsW0lNw0xDkZWgCViBY+TdT7Gmw/q8hmvj9TEwbMGT
 7tmQl9MupQ2bLY8WuTiGA6eNiEZld9esJGthI43xGQDJl4Y3FeciIZWcBru20+wu
 GnC3QS3FlmYlp2WuWcKU9lEGXhmoX/7/1WVhZkoMsIvi05c2JCxSxstK7QNfUaAH
 8q2/Wc0fYIGm2owH+b1Mpn0w37GZtgl7Bxxzakg7B7Ko0q/EnO7z6XVup1/abKRU
 NtUKlWIL7NDiHjHO6j0hBb3rGi7B3wo86P7GTPJb12Dg9EBF5DVhekXeGI/ChzE9
 WIV1PxR0seSapzlJ92HHmWLAtcRLtXXesqcctmN4d2URBtsx9DEwo0Upiz//reYE
 TBncQbtniVt2xXEl7sqNEYei75IxC3Dg1AgDL/zVQDl8PW0UvKo8Qb0cW7EnF9Vg
 AcjD6R72dAgbqUMYOP0nriKxzXwa0Jls9aF3zBgcikKMGeyD6Z/Exlq4LexhSeuw
 cWKsrQUYcLGKZPRN
 =b6+A
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-for-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm updates for 4.19

- Support for Group0 interrupts in guests
- Cache management optimizations for ARMv8.4 systems
- Userspace interface for RAS, allowing error retrival and injection
- Fault path optimization
- Emulated physical timer fixes
- Random cleanups
2018-08-22 14:07:56 +02:00
Benjamin Herrenschmidt 9bd5196e5c platform/x86: acer-wmi: Silence "unsupported" message a bit
This driver prints that "Unsupported machine..." message on every boot on
ThinkPad X1 Carbon laptops (and I assume a number of other systems), which
causes graphical boots to "glitch" a bit and is rather annoying ...

Make it a pr_debug instead.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-08-22 13:40:24 +03:00
Yoshinori Sato 4bdf61ccbe h8300: fix IRQ no
Old timer handler use 24 (Compare match A).
But current timer handler use 26 (Overflow).

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:23 +09:00
Randy Dunlap 7b291be81f arch/h8300: add a defconfig target
Make the "defconfig" target valid for arch/h8300.  Currently
"make ARCH=h8300 defconfig" produces:

*** Can't find default configuration "arch/h8300/defconfig"!
../scripts/kconfig/Makefile:87: recipe for target 'defconfig' failed

By adding a value for KBUILD_DEFCONFIG, "make ARCH=h8300 defconfig"
successfully produces a kernel .config file:

*** Default configuration is based on 'edosk2674_defconfig'

This is useful for Kconfig editing/testing.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp (moderated for non-subscribers)
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:22 +09:00
Randy Dunlap ce156febee arch/h8300: eliminate kgbd.c warning
Drop the "const" qualifier from arch_kgdb_ops to eliminate the gcc
warning (gcc version is 8.1.0).

arch/h8300/kernel/kgdb.c:132:24: error: conflicting type qualifiers for 'arch_kgdb_ops'
 const struct kgdb_arch arch_kgdb_ops = {
In file included from ../arch/h8300/kernel/kgdb.c:12:
../include/linux/kgdb.h:284:26: note: previous declaration of 'arch_kgdb_ops' was here
 extern struct kgdb_arch  arch_kgdb_ops;

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:22 +09:00
Randy Dunlap cfa2d688e2 arch/h8300: eliminate ptrace.h warnings
Add a "struct task_struct;" stub to arch/h8300's ptrace.h header to
eliminate gcc warnings (gcc version is 8.1.0).

../arch/h8300/include/asm/ptrace.h:32:34: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration
 extern long h8300_get_reg(struct task_struct *task, int regno);
../arch/h8300/include/asm/ptrace.h:33:33: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration
 extern int h8300_put_reg(struct task_struct *task, int regno,

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:21 +09:00
Luc Van Oostenryck 1b803a357d h8300:let the checker know that size_t is ulong
All 64bit archs use unsigned long for size_t and most 32bit
archs use 'unsigned int'. By default, this is what is assumed
by sparse.

However, on h8300 (a 32bit arch) size_t is unsigned long which
can led sparse to emit wrong warnings.

Fix this by passing to sparse the flag -msize-long, telling it
that size_t is unsigned long.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:21 +09:00
Will Deacon 9819d4e47e h8300: Don't include linux/kernel.h in asm/atomic.h
linux/kernel.h isn't needed by asm/atomic.h and will result in circular
dependencies when the asm-generic atomic bitops are built around the
tomic_long_t interface.

Remove the broad include and replace it with linux/compiler.h for
READ_ONCE etc and asm/irqflags.h for arch_local_irq_save etc.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:20 +09:00
Rob Herring ec3d5f1658 h8300: remove unnecessary of_platform_populate call
The DT core will call of_platform_populate, so it is not necessary for
arch specific code to call it unless there are custom match entries,
auxdata or parent device. Neither of those apply here, so remove the call.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:20 +09:00
Geert Uytterhoeven 5743ee22bf h8300: Correct signature of test_bit()
mm/filemap.c: In function 'clear_bit_unlock_is_negative_byte':
    mm/filemap.c:1181:30: warning: passing argument 2 of 'test_bit' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
      return test_bit(PG_waiters, mem);
				  ^~~
    In file included from include/linux/bitops.h:38,
		     from include/linux/kernel.h:11,
		     from include/linux/list.h:9,
		     from include/linux/wait.h:7,
		     from include/linux/wait_bit.h:8,
		     from include/linux/fs.h:6,
		     from include/linux/dax.h:5,
		     from mm/filemap.c:14:
    arch/h8300/include/asm/bitops.h:69:57: note: expected 'const long unsigned int *' but argument is of type 'volatile void *'
     static inline int test_bit(int nr, const unsigned long *addr)
					~~~~~~~~~~~~~~~~~~~~~^~~~

Make the bitmask pointed to by the "addr" parameter volatile to fix
this, like is done on other architectures.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:19 +09:00
Yoshinori Sato 558e6694cd h8300: irqchip: fix warning
Var "addr" type incorrect.
It have interrupt controler register address.
Type of void __iomem is correct.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:19 +09:00
Rob Herring c489dfefe7 h8300: switch to NO_BOOTMEM
Commit 0fa1c57934 ("of/fdt: use memblock_virt_alloc for early alloc")
inadvertently switched the DT unflattening allocations from memblock to
bootmem which doesn't work because the unflattening happens before
bootmem is initialized. Swapping the order of bootmem init and
unflattening could also fix this, but removing bootmem is desired. So
enable NO_BOOTMEM on h8300 like other architectures have done.

Fixes: 0fa1c57934 ("of/fdt: use memblock_virt_alloc for early alloc")
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:18 +09:00
Yoshinori Sato 811d1b0e65 h8300: gcc-8.1 fix
Since gcc 8.1 does not generate an assignment statement to er 0,
we had to explicitly write it.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:18 +09:00
Yoshinori Sato 686320e94d h8300: Add missing output register.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2018-08-22 19:14:17 +09:00
Linus Torvalds ad1d697358 fuse update for 4.19
This contains various bug fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCW3xvGwAKCRDh3BK/laaZ
 PKECAP9qUpdtQ5RaIL/y9OGZzJLSZbBZuK3LGNY2u2B3EfrSjgEAvhkhXyOQgvVi
 kgYLNszbg/C+w8U4Xc5GWB6cjNm6rwE=
 =GJI7
 -----END PGP SIGNATURE-----

Merge tag 'fuse-update-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse update from Miklos Szeredi:
 "Various bug fixes and cleanups"

* tag 'fuse-update-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: reduce allocation size for splice_write
  fuse: use kvmalloc to allocate array of pipe_buffer structs.
  fuse: convert last timespec use to timespec64
  fs: fuse: Adding new return type vm_fault_t
  fuse: simplify fuse_abort_conn()
  fuse: Add missed unlock_page() to fuse_readpages_fill()
  fuse: Don't access pipe->buffers without pipe_lock()
  fuse: fix initial parallel dirops
  fuse: Fix oops at process_init_reply()
  fuse: umount should wait for all requests
  fuse: fix unlocked access to processing queue
  fuse: fix double request_end()
2018-08-21 18:47:36 -07:00
Linus Torvalds d9a185f8b4 overlayfs update for 4.19
This contains two new features:
 
  1) Stack file operations: this allows removal of several hacks from the
     VFS, proper interaction of read-only open files with copy-up,
     possibility to implement fs modifying ioctls properly, and others.
 
  2) Metadata only copy-up: when file is on lower layer and only metadata is
     modified (except size) then only copy up the metadata and continue to
     use the data from the lower file.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCW3srhAAKCRDh3BK/laaZ
 PC6tAQCP+KklcN+TvNp502f+O/kATahSpgnun4NY1/p4I8JV+AEAzdlkTN3+MiAO
 fn9brN6mBK7h59DO3hqedPLJy2vrgwg=
 =QDXH
 -----END PGP SIGNATURE-----

Merge tag 'ovl-update-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs

Pull overlayfs updates from Miklos Szeredi:
 "This contains two new features:

   - Stack file operations: this allows removal of several hacks from
     the VFS, proper interaction of read-only open files with copy-up,
     possibility to implement fs modifying ioctls properly, and others.

   - Metadata only copy-up: when file is on lower layer and only
     metadata is modified (except size) then only copy up the metadata
     and continue to use the data from the lower file"

* tag 'ovl-update-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (66 commits)
  ovl: Enable metadata only feature
  ovl: Do not do metacopy only for ioctl modifying file attr
  ovl: Do not do metadata only copy-up for truncate operation
  ovl: add helper to force data copy-up
  ovl: Check redirect on index as well
  ovl: Set redirect on upper inode when it is linked
  ovl: Set redirect on metacopy files upon rename
  ovl: Do not set dentry type ORIGIN for broken hardlinks
  ovl: Add an inode flag OVL_CONST_INO
  ovl: Treat metacopy dentries as type OVL_PATH_MERGE
  ovl: Check redirects for metacopy files
  ovl: Move some dir related ovl_lookup_single() code in else block
  ovl: Do not expose metacopy only dentry from d_real()
  ovl: Open file with data except for the case of fsync
  ovl: Add helper ovl_inode_realdata()
  ovl: Store lower data inode in ovl_inode
  ovl: Fix ovl_getattr() to get number of blocks from lower
  ovl: Add helper ovl_dentry_lowerdata() to get lower data dentry
  ovl: Copy up meta inode data from lowest data inode
  ovl: Modify ovl_lookup() and friends to lookup metacopy dentry
  ...
2018-08-21 18:19:09 -07:00
Linus Torvalds c22fc16d17 Changes since last update:
- Fix an uninitialized variable
 - Don't use obviously garbage AG header counters to calculate
   transaction reservations
 - Trigger icount recalculation on bad icount when monting.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAlty8tsACgkQ+H93GTRK
 tOtoKw/+OeCaY6jZc2JoztBwLSUJsMYQ0R8Wsj5GRb4bVp9b0zes7RJMFU03nCtj
 XuE4Rhdsx+6+QZQKxTq/Z6lrKHEjF0kL1EVGHtL46Inr+Z+Rr4bLBG6NV1o0dg7B
 CR1IqW5vYcZ7Vrk9ko/RXVXtuCIxBS5jSW/S/uFT95Y4lVMAf/2asR/OoYt5ZVE3
 17CUfWRifiSGoBQpjtfZd63F23XlEEusiErC5iS9rUbE2qC9FxP9EuvoUP5M/n01
 nLS34Fjw7X739AiwHbf10fQPOvBr7atTazCXskjy4gbwqIWTmuhbF4ieTU1OfTI8
 ozhvYomBYLiZbsEYBhVCs09VEnIfHmf2HoLh//efGE8VEvoQllxdn/g2PQekoPAn
 M7VnRUXCTvaLI8IE2d3Ed1VWm0OTea09xqEiNpB0XGjegim9pXuf6t/zbe4R0vJy
 YLBgQT8XRPw5ZgCnBbxvZOXXxQtAqKnqZzYSWGxlHJhhduKVeKMqerhP0nn0ui8g
 wAOmOe3XEoyLfSY8WY0ACEEEA00pAwErerwVEFLCpaKTh5GOY4i3OBdqcZOtXacn
 f5oIeG9HZKAXKkOTGwpq1zGHTOYhz4mxAYhodRFiEE8rXHDa9odUWQ/iG0zgZaO6
 19xznXjXkVWVg0QJqQJi6SbEkkrAEFtFRYH+VPTgWM/1tg47a14=
 =+0Eq
 -----END PGP SIGNATURE-----

Merge tag 'xfs-4.19-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Darrick Wong:

 - Fix an uninitialized variable

 - Don't use obviously garbage AG header counters to calculate
   transaction reservations

 - Trigger icount recalculation on bad icount when mounting

* tag 'xfs-4.19-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  iomap: fix WARN_ON_ONCE on uninitialized variable
  xfs: sanity check ag header values in xrep_calc_ag_resblks
  xfs: recalculate summary counters at mount time if icount is bad
2018-08-21 18:15:47 -07:00
Linus Torvalds c1fecabecc power supply and reset changes for the v4.19 series
* Improve support for TI bq20z75 in sbs-battery
 * Add Qualcomm PM8xxx reboot driver
 * Add cros-ec USBPD charger driver
 * Move ds2760 battery driver from w1 to power-supply and add DT support
 * Misc. fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlt8iTUACgkQ2O7X88g7
 +poDsQ//WKpd+hI0poP4X4MZ6cV3kmZH9u4Tbx1MsG7lywIE8BZZ+JQmeix9fmWp
 05reMM95zrgbWesY72/2Zpdj7G2IiNWPgaTCnBymyhcWM0y1gwM6ftHvY/Ed+pxz
 in4vjzwE0VIYK/lE64Evr1V8SqpKTtM3fco0M0snkrgyJ9FmAuT+fbnEyqNNdjHm
 hUSTRZGW6Cv1TFyhgf8bEm7s2paT5uhuABuaKYM2/XQ7PYTjF7IRA7QY871h2y6n
 9GQ7uZxtjYRTsQ5uBh1DDFuN56pvXFY1sdJxNtry+/JbQSIvzdHAVbS3mRYgbajJ
 ALfy2bKadNslbew5VSaEEswTNSZOcQ8/MNlA2o6C64mSbQ2gUfBB3wkWduO4o1jd
 uTAbCGYGCf89RocG53CieLIphK752Igd+41kkANZm0H5hu4bjNuZr1nHY1ynZSWG
 NNN1vus/IjPhd92Sx6joKHbOu9LXUukM/EQBHOGXUpgsh9zNmLnCVLLgH+jG792C
 uT3Sh4qHliWxfajd7uVR6ytALVgz6Vtp9Ry+SpOIgXMGYzcHH0x4H3Cn1gcgwu3O
 1PrTFk0+kgjZ7eOLz0X2niE3YE/+WvKKkjpf9fnimFhxppxdIA2aoJseXmYex6A2
 1tsos9wlV+Th5FAVAilq1DTKwGQ3UGTYNYbPbOaQtt9qimbCuYc=
 =UTGp
 -----END PGP SIGNATURE-----

Merge tag 'for-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:

 - Improve support for TI bq20z75 in sbs-battery

 - Add Qualcomm PM8xxx reboot driver

 - Add cros-ec USBPD charger driver

 - Move ds2760 battery driver from w1 to power-supply and add DT support

 - Misc fixes

* tag 'for-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
  power: supply: bq27xxx: Update comments
  power: supply: max77693_charger: fix unintentional fall-through
  power: supply: mark expected switch fall-throughs
  power: supply: lego_ev3_battery: fix Vce offset
  power: supply: lego_ev3_battery: Don't ignore iio_read_channel_processed() return value
  power: supply: ds2760_battery: add devicetree probing
  power: supply: ds2760_battery: merge ds2760 supply driver with its w1 slave companion
  w1: core: match sub-nodes of bus masters in devicetree
  dt-bindings: w1: document bindings for ds2760 battery monitor
  dt-bindings: w1: document generic onewire bindings
  power: supply: adp5061: Fix a couple off by ones
  dt-bindings: power: reset: qcom: Add resin binding
  adp5061: New driver for ADP5061 I2C battery charger
  power: generic-adc-battery: check for duplicate properties copied from iio channels
  power: generic-adc-battery: fix out-of-bounds write when copying channel properties
  power: supply: axp288_charger: Fix initial constant_charge_current value
  power: supply: ab8500: stop using getnstimeofday64()
  power: gemini-poweroff: Avoid more spurious poweroffs
  power: vexpress: fix corruption in notifier registration
  power: remove possible deadlock when unregistering power_supply
  ...
2018-08-21 18:06:27 -07:00
Linus Torvalds 99cc7ad46b Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:

 - the core has now a lockless variant of i2c_smbus_xfer. Some open
   coded versions of this got removed in drivers. This also enables
   proper SCCB support in regmap.

 - locking got a more precise naming. i2c_{un}lock_adapter() had to go,
   and we know use i2c_lock_bus() consistently with flags like
   I2C_LOCK_ROOT_ADAPTER and I2C_LOCK_SEGMENT to avoid ambiguity.

 - the gpio fault injector got a new delicate testcase

 - the bus recovery procedure got fixed to handle the new testcase
   correctly

 - a new quirk flag for controllers not able to handle zero length
   messages together with driver updates to use it

 - new drivers: FSI bus attached I2C masters, GENI I2C controller, Owl
   family S900

 - and a good set of driver improvements and bugfixes

* 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (77 commits)
  i2c: rcar: implement STOP and REP_START according to docs
  i2c: rcar: refactor private flags
  i2c: core: ACPI: Make acpi_gsb_i2c_read_bytes() check i2c_transfer return value
  i2c: core: ACPI: Properly set status byte to 0 for multi-byte writes
  dt-bindings: i2c: rcar: Add r8a774a1 support
  dt-bindings: i2c: sh_mobile: Add r8a774a1 support
  i2c: imx: Simplify stopped state tracking
  i2c: imx: Fix race condition in dma read
  i2c: pasemi: remove hardcoded bus numbers on smbus
  i2c: designware: Add SPDX license tag
  i2c: designware: Convert to use struct i2c_timings
  i2c: core: Parse SDA hold time from firmware
  i2c: designware-pcidrv: Mark expected switch fall-through
  i2c: amd8111: Mark expected switch fall-through
  i2c: sh_mobile: use core to detect 'no zero length read' quirk
  i2c: xlr: use core to detect 'no zero length' quirk
  i2c: rcar: use core to detect 'no zero length' quirk
  i2c: stu300: use core to detect 'no zero length' quirk
  i2c: pmcmsp: use core to detect 'no zero length' quirk
  i2c: mxs: use core to detect 'no zero length' quirk
  ...
2018-08-21 17:40:46 -07:00
Arnd Bergmann 845b397a77 IB/ucm: fix UCM link error
Building UCM with CONFIG_INFINIBAND_USER_ACCESS=m results in a
set of link errors including:

drivers/infiniband/core/ucm.o: In function `ib_ucm_event_handler':
ucm.c:(.text+0x6dc): undefined reference to `ib_copy_path_rec_to_user'
drivers/infiniband/core/ucma.o: In function `ucma_event_handler':
ucma.c:(.text+0xdc0): undefined reference to `ib_copy_ah_attr_to_user'

To get it to build-test again, this makes the option itself a
tristate, which lets Kconfig figure out the dependency correctly.

Fixes: 486edfb103 ("IB/ucm: Fix compiling ucm.c")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-08-21 16:56:32 -06:00
Linus Torvalds 0214f46b3a Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull core signal handling updates from Eric Biederman:
 "It was observed that a periodic timer in combination with a
  sufficiently expensive fork could prevent fork from every completing.
  This contains the changes to remove the need for that restart.

  This set of changes is split into several parts:

   - The first part makes PIDTYPE_TGID a proper pid type instead
     something only for very special cases. The part starts using
     PIDTYPE_TGID enough so that in __send_signal where signals are
     actually delivered we know if the signal is being sent to a a group
     of processes or just a single process.

   - With that prep work out of the way the logic in fork is modified so
     that fork logically makes signals received while it is running
     appear to be received after the fork completes"

* 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (22 commits)
  signal: Don't send signals to tasks that don't exist
  signal: Don't restart fork when signals come in.
  fork: Have new threads join on-going signal group stops
  fork: Skip setting TIF_SIGPENDING in ptrace_init_task
  signal: Add calculate_sigpending()
  fork: Unconditionally exit if a fatal signal is pending
  fork: Move and describe why the code examines PIDNS_ADDING
  signal: Push pid type down into complete_signal.
  signal: Push pid type down into __send_signal
  signal: Push pid type down into send_signal
  signal: Pass pid type into do_send_sig_info
  signal: Pass pid type into send_sigio_to_task & send_sigurg_to_task
  signal: Pass pid type into group_send_sig_info
  signal: Pass pid and pid type into send_sigqueue
  posix-timers: Noralize good_sigevent
  signal: Use PIDTYPE_TGID to clearly store where file signals will be sent
  pid: Implement PIDTYPE_TGID
  pids: Move the pgrp and session pid pointers from task_struct to signal_struct
  kvm: Don't open code task_pid in kvm_vcpu_ioctl
  pids: Compute task_tgid using signal->leader_pid
  ...
2018-08-21 13:47:29 -07:00
Rafael J. Wysocki 01ac7c4c2e Merge branches 'pm-cpufreq', 'pm-pci' and 'pm-sleep'
Merge fixes for the ondemand and conservative cpufreq governors,
PCI power management and system wakeup framework.

* pm-cpufreq:
  cpufreq: governor: Avoid accessing invalid governor_data

* pm-pci:
  PCI / ACPI / PM: Resume all bridges on suspend-to-RAM

* pm-sleep:
  PM / sleep: wakeup: Fix build error caused by missing SRCU support
2018-08-21 22:39:24 +02:00
Rafael J. Wysocki d1f3ab5b13 Merge branch 'acpi-pmic'
Merge a CrystalCove PMIC driver update.

* acpi-pmic:
  ACPI / PMIC: CrystalCove: Extend PMOP support to support all possible fields
2018-08-21 22:36:31 +02:00
Linus Torvalds 40fafdcbcd Minor changes this time around for 4.19.
cros_ec_i2c and cros_ec_spi drivers moved from mfd
 to chrome platform.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlt8XgMACgkQHwn1ewov
 5li8MQ//RiM40heoQL4IaZbivsKlB1gT2zX/NvxfL54OX3eG35IYuyFiNKX35bPq
 suupcZq2tk5btj1Wu5ljXXExc1KS8vCDwCVA9ljZGZ97sr7ttGzwX0oVxmXFjt6J
 2L+RT40rc/H33jIAhWcxi73cwVE9Of8ao+UbnZNWxL30ddX3r6lH2NS1gHta6Mb9
 33qReMT5Z1TB+OCZd+ktkC6fS3p1LESIHY/jfu6okAxbd7auJC7q5hl6ngeGFrkx
 cLs8dKlHFWBcmdjIiY8f93vgokKxbO+vnx/0m+7uPa36vOi2RbEz+Hgy5+v1scZ0
 XOasPnY9AbJLuX+5q6ukYNVD536xlbeThsvxeN4ymjTLnlnRzLw/1+ezSTKYAFPQ
 6lJkudcLLmGDia7wH1mTjyHdU0ZsYWH9SzgUf/panX5fdy7wpPU1D4vfm36jS2wJ
 cvNXPwDZ3Pqbp24IFtFR3phgn4KNr5dXPfiHaItcPb0Fykol5tFw8tAnChWlDyCX
 fJ6U/Xj0tmQ0Awj/SEEuCWALgt8X3czAz/SSUSfLm0zSixm4kJ2gQHV1aP7dXR3f
 osxhISHPxt9+6CrnUodUYpD1QG60O+mdrx7tcs4WVPzT9Fpnp62YgUkey6SLeyhj
 itQtghxlYxJeB1hgU3Ez7KObiujA0UCrRKm5BklRV0gyM7GqSKk=
 =HNMG
 -----END PGP SIGNATURE-----

Merge tag 'chrome-platform-for-linus-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform

Pull chrome platform updates from Benson Leung.

Everything but the SPDX identifier updates actually came in earlier
through the MFD merge.

* tag 'chrome-platform-for-linus-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
  platform/chrome: chromeos_tbmc - fix SPDX identifier
2018-08-21 13:33:33 -07:00
Linus Torvalds 5e26830990 Microblaze patches for 4.19-rc1
- use generic noncoherent direct mapping
 - use LDFLAGS instead of LD
 - pci error path fix
 - remove incorrect comments
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlt7sOgACgkQykllyylKDCGmZQCgh/UHi6akGXvw9n9rUJjsPrTZ
 nL4An1/PL/CMcItcuXqLBXCQuUZ7B7Hb
 =3t/K
 -----END PGP SIGNATURE-----

Merge tag 'microblaze-v4.19-rc1' of git://git.monstr.eu/linux-2.6-microblaze

Pull arch/microblaze updates from Michal Simek:

 - use generic noncoherent direct mapping

 - use LDFLAGS instead of LD

 - pci error path fix

 - remove incorrect comments

* tag 'microblaze-v4.19-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze/PCI: Remove stale pcibios_align_resource() comment
  microblaze: delete wrong comment about machine_early_init
  microblaze: add endianness options to LDFLAGS instead of LD
  microblaze: remove consistent_sync and consistent_sync_page
  microblaze: use generic dma_noncoherent_ops
  microblaze: warn if of_iomap() failed
2018-08-21 13:18:22 -07:00
Masahiro Yamada c84ca616b1 sparc: fix KBUILD_DEFCONFIG for ARCH=sparc32
As commit 5ba800962a ("kbuild: update ARCH alias info for sparc")
addressed, SPARC accepts ARCH=sparc32 as an alias.

However, arch/sparc/Makefile wrongly sets KBUILD_DEFCONFIG, then
sparc64_defconfig is chosen as the base configuration for ARCH=sparc32.

  $ make ARCH=sparc32 defconfig
  *** Default configuration is based on 'sparc64_defconfig'
  #
  # configuration written to .config
  #

Fix the logic to choose sparc64_defconfig only when ARCH=sparc64.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-21 12:41:12 -07:00
David S. Miller aa59fa7806 Merge branch 'sparc32-NO_BOOTMEM'
Mike Rapoport says:

====================
sparc32: switch to NO_BOOTMEM

These patches convert sparc32 to use memblock + nobootmem.
I've made the conversion as simple as possible, just enough to allow moving
HAVE_MEMBLOCK and NO_BOOTMEM to the common SPARC configuration.

v2 changes:
* split whitespace changes to a separate patch
* address Sam's comments [1]

[1] https://lkml.org/lkml/2018/8/2/403
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-21 12:40:26 -07:00
Mike Rapoport 8818d89cf8 sparc32: split ramdisk detection and reservation to a helper function
The detection and reservation of ramdisk memory were separated to allow
bootmem bitmap initialization after the ramdisk boundaries are detected.
Since the bootmem initialization is removed, the reservation of ramdisk
memory is done immediately after its boundaries are found.

Split the entire block into a separate helper function.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-21 12:40:26 -07:00