Skip to content

Commit

Permalink
smdk v1.2 - fix issue : build failure on CONFIG_LOCKDEP=y or CONFIG_E…
Browse files Browse the repository at this point in the history
…XMEM=n

Signed-off-by: KyungsanKim <ks0204.kim@samsung.com>
Signed-off-by: JongchanLim <jongchan.im@samsung.com>
Signed-off-by: DonghwaKang <dh1128.kang@samsung.com>
Signed-off-by: JunhyeokIm<junhyeok.im@samsung.com>
  • Loading branch information
KyungsanKim committed Aug 23, 2022
1 parent 9ebacf0 commit 2cd3b4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/linux-5.18-rc3-smdk/lib/radix-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,11 @@ void __init radix_tree_init(void)
{
int ret;

#ifdef CONFIG_EXMEM
BUILD_BUG_ON(RADIX_TREE_MAX_TAGS + __GFP_BITS_SHIFT > 34);
#else
BUILD_BUG_ON(RADIX_TREE_MAX_TAGS + __GFP_BITS_SHIFT > 32);
#endif
BUILD_BUG_ON(ROOT_IS_IDR & ~GFP_ZONEMASK);
BUILD_BUG_ON(XA_CHUNK_SIZE > 255);
radix_tree_node_cachep = kmem_cache_create("radix_tree_node",
Expand Down
5 changes: 4 additions & 1 deletion lib/linux-5.18-rc3-smdk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4496,6 +4496,8 @@ static inline unsigned int gfp_to_alloc_flags_cma(gfp_t gfp_mask,
return alloc_flags;
}


#ifdef CONFIG_EXMEM
static inline bool __is_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
if (user_zonelist_order == ZONELIST_ORDER_NONE &&
Expand All @@ -4522,6 +4524,7 @@ static inline bool __is_zone_allowed(struct zone *z, gfp_t gfp_mask)

return true;
}
#endif

/*
* get_page_from_freelist goes through the zonelist trying to allocate
Expand Down Expand Up @@ -5786,7 +5789,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
for_each_zone_zonelist_nodemask(zone, z, ac.zonelist, ac.highest_zoneidx, ac.nodemask) {
unsigned long mark;

#if CONFIG_EXMEM
#ifdef CONFIG_EXMEM
if (!__is_zone_allowed(zone, gfp))
continue;
#endif
Expand Down

0 comments on commit 2cd3b4b

Please sign in to comment.