diff options
| author | Mark Brown <broonie@kernel.org> | 2020-12-10 13:30:11 +0000 | 
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2020-12-10 13:30:11 +0000 | 
| commit | 49ab19a4a51a31cb06992386cec4be82ebca5a2d (patch) | |
| tree | de7d31ec7ded2c8ab8dbdfe5a55fa283068023d0 /mm/memory-failure.c | |
| parent | b0dfd948379c79b8754e224e29b99d30ce0d79b8 (diff) | |
| parent | 3b25f337929e73232f0aa990cd68a129f53652e2 (diff) | |
Merge series "spi: spi-geni-qcom: Use gpio descriptors for CS" from Stephen Boyd <swboyd@chromium.org>:
Collected patches from the two series below and associated tags so they
can be merged in one pile through the spi tree. Merry December!
SPI: https://lore.kernel.org/r/20201202214935.1114381-1-swboyd@chromium.org
cros-ec: https://lore.kernel.org/r/20201203011649.1405292-1-swboyd@chromium.org
Cc: Akash Asthana <akashast@codeaurora.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Alexandru M Stan <amstan@chromium.org>
Stephen Boyd (3):
  platform/chrome: cros_ec_spi: Don't overwrite spi::mode
  platform/chrome: cros_ec_spi: Drop bits_per_word assignment
  spi: spi-geni-qcom: Use the new method of gpio CS control
 drivers/platform/chrome/cros_ec_spi.c | 2 --
 drivers/spi/spi-geni-qcom.c           | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
base-commit: b65054597872ce3aefbc6a666385eabdf9e288da
--
https://chromeos.dev
Diffstat (limited to 'mm/memory-failure.c')
| -rw-r--r-- | mm/memory-failure.c | 36 | 
1 files changed, 17 insertions, 19 deletions
| diff --git a/mm/memory-failure.c b/mm/memory-failure.c index c0bb186bba62..5d880d4eb9a2 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1057,27 +1057,25 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn,  	if (!PageHuge(hpage)) {  		unmap_success = try_to_unmap(hpage, ttu);  	} else { -		/* -		 * For hugetlb pages, try_to_unmap could potentially call -		 * huge_pmd_unshare.  Because of this, take semaphore in -		 * write mode here and set TTU_RMAP_LOCKED to indicate we -		 * have taken the lock at this higer level. -		 * -		 * Note that the call to hugetlb_page_mapping_lock_write -		 * is necessary even if mapping is already set.  It handles -		 * ugliness of potentially having to drop page lock to obtain -		 * i_mmap_rwsem. -		 */ -		mapping = hugetlb_page_mapping_lock_write(hpage); - -		if (mapping) { -			unmap_success = try_to_unmap(hpage, +		if (!PageAnon(hpage)) { +			/* +			 * For hugetlb pages in shared mappings, try_to_unmap +			 * could potentially call huge_pmd_unshare.  Because of +			 * this, take semaphore in write mode here and set +			 * TTU_RMAP_LOCKED to indicate we have taken the lock +			 * at this higer level. +			 */ +			mapping = hugetlb_page_mapping_lock_write(hpage); +			if (mapping) { +				unmap_success = try_to_unmap(hpage,  						     ttu|TTU_RMAP_LOCKED); -			i_mmap_unlock_write(mapping); +				i_mmap_unlock_write(mapping); +			} else { +				pr_info("Memory failure: %#lx: could not lock mapping for mapped huge page\n", pfn); +				unmap_success = false; +			}  		} else { -			pr_info("Memory failure: %#lx: could not find mapping for mapped huge page\n", -				pfn); -			unmap_success = false; +			unmap_success = try_to_unmap(hpage, ttu);  		}  	}  	if (!unmap_success) | 
