[lkml]   [2011]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] mm: Fix BUILD_BUG assertion in pmdp_clear_flush_young()
    From: David Daney <>

    It has been reported that when building for sh:

    mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
    mm/pgtable-generic.c:76: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed

    Adding some ugle #ifdeffery will probably fix this issue.

    Signed-off-by: David Daney <>

    This is completely untested, but may be the best fix for this. Linus
    and others have expressed a dislike for using BUG() to detect what
    should be dead code paths at runtime, but it seems to be the state of
    the art here.

    mm/pgtable-generic.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
    index eb663fb..73784c8 100644
    --- a/mm/pgtable-generic.c
    +++ b/mm/pgtable-generic.c
    @@ -70,7 +70,7 @@ int pmdp_clear_flush_young(struct vm_area_struct *vma,
    unsigned long address, pmd_t *pmdp)
    int young;
    VM_BUG_ON(address & ~HPAGE_PMD_MASK);

     \ /
      Last update: 2011-12-19 18:41    [W:0.020 / U:1.332 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site