diff options
author | David S. Miller <davem@davemloft.net> | 2016-05-09 15:59:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 15:59:24 -0400 |
commit | e800072c18f0d7b89a80fa46dceb3d080c80e09c (patch) | |
tree | 8da6cb7944762a60ec37594720c1ad2757631c2f /drivers/xen/balloon.c | |
parent | e8ed77dfa90dd79c5343415a4bbbfdab9787b35a (diff) | |
parent | b507146bb6b9ac0c0197100ba3e299825a21fed3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
In netdevice.h we removed the structure in net-next that is being
changes in 'net'. In macsec.c and rtnetlink.c we have overlaps
between fixes in 'net' and the u64 attribute changes in 'net-next'.
The mlx5 conflicts have to do with vxlan support dependencies.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 9781e0dd59d6..d46839f51e73 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -151,6 +151,8 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_wq); | |||
151 | static void balloon_process(struct work_struct *work); | 151 | static void balloon_process(struct work_struct *work); |
152 | static DECLARE_DELAYED_WORK(balloon_worker, balloon_process); | 152 | static DECLARE_DELAYED_WORK(balloon_worker, balloon_process); |
153 | 153 | ||
154 | static void release_memory_resource(struct resource *resource); | ||
155 | |||
154 | /* When ballooning out (allocating memory to return to Xen) we don't really | 156 | /* When ballooning out (allocating memory to return to Xen) we don't really |
155 | want the kernel to try too hard since that can trigger the oom killer. */ | 157 | want the kernel to try too hard since that can trigger the oom killer. */ |
156 | #define GFP_BALLOON \ | 158 | #define GFP_BALLOON \ |
@@ -267,6 +269,20 @@ static struct resource *additional_memory_resource(phys_addr_t size) | |||
267 | return NULL; | 269 | return NULL; |
268 | } | 270 | } |
269 | 271 | ||
272 | #ifdef CONFIG_SPARSEMEM | ||
273 | { | ||
274 | unsigned long limit = 1UL << (MAX_PHYSMEM_BITS - PAGE_SHIFT); | ||
275 | unsigned long pfn = res->start >> PAGE_SHIFT; | ||
276 | |||
277 | if (pfn > limit) { | ||
278 | pr_err("New System RAM resource outside addressable RAM (%lu > %lu)\n", | ||
279 | pfn, limit); | ||
280 | release_memory_resource(res); | ||
281 | return NULL; | ||
282 | } | ||
283 | } | ||
284 | #endif | ||
285 | |||
270 | return res; | 286 | return res; |
271 | } | 287 | } |
272 | 288 | ||