diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-12 01:37:05 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-14 20:49:26 +0200 |
commit | b4a21fc275e99fc63c77b30da92ee497f8a7bdb6 (patch) | |
tree | 0402fddcd4ae52a6a6d358dae0d6581df881a4ac /drivers/base/regmap/internal.h | |
parent | Linux 4.3-rc1 (diff) | |
download | linux-b4a21fc275e99fc63c77b30da92ee497f8a7bdb6.tar.xz linux-b4a21fc275e99fc63c77b30da92ee497f8a7bdb6.zip |
regmap: Allocate buffers with GFP_ATOMIC when fast_io == true
If a regmap is using fast_io, allocate the scratch buffer in
regmap_bulk_write() with GFP_ATOMIC instead of GFP_KERNEL.
Otherwise we may schedule while atomic.
Reported-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index cc557886ab23..f3b1445da0a5 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -59,6 +59,7 @@ struct regmap { regmap_lock lock; regmap_unlock unlock; void *lock_arg; /* This is passed to lock/unlock functions */ + gfp_t alloc_flags; struct device *dev; /* Device we do I/O on */ void *work_buf; /* Scratch buffer used to format I/O */ |