drivers/tty/serial/8250: update driver for JH7100
[platform/kernel/linux-starfive.git] / mm / vmstat.c
index da264a0..b2371d7 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/mm_inline.h>
 #include <linux/page_ext.h>
 #include <linux/page_owner.h>
-#include <linux/migrate.h>
 
 #include "internal.h"
 
@@ -355,8 +354,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
         * CPU migrations and preemption potentially corrupts a counter so
         * disable preemption.
         */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        x = delta + __this_cpu_read(*p);
 
@@ -368,8 +366,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
        }
        __this_cpu_write(*p, x);
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 EXPORT_SYMBOL(__mod_zone_page_state);
 
@@ -393,8 +390,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
        }
 
        /* See __mod_node_page_state */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        x = delta + __this_cpu_read(*p);
 
@@ -406,8 +402,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
        }
        __this_cpu_write(*p, x);
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 EXPORT_SYMBOL(__mod_node_page_state);
 
@@ -441,8 +436,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
        s8 v, t;
 
        /* See __mod_node_page_state */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        v = __this_cpu_inc_return(*p);
        t = __this_cpu_read(pcp->stat_threshold);
@@ -453,8 +447,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
                __this_cpu_write(*p, -overstep);
        }
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 
 void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
@@ -466,8 +459,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
        VM_WARN_ON_ONCE(vmstat_item_in_bytes(item));
 
        /* See __mod_node_page_state */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        v = __this_cpu_inc_return(*p);
        t = __this_cpu_read(pcp->stat_threshold);
@@ -478,8 +470,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
                __this_cpu_write(*p, -overstep);
        }
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 
 void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
@@ -501,8 +492,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
        s8 v, t;
 
        /* See __mod_node_page_state */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        v = __this_cpu_dec_return(*p);
        t = __this_cpu_read(pcp->stat_threshold);
@@ -513,8 +503,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
                __this_cpu_write(*p, overstep);
        }
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 
 void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
@@ -526,8 +515,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
        VM_WARN_ON_ONCE(vmstat_item_in_bytes(item));
 
        /* See __mod_node_page_state */
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_disable();
+       preempt_disable_nested();
 
        v = __this_cpu_dec_return(*p);
        t = __this_cpu_read(pcp->stat_threshold);
@@ -538,8 +526,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
                __this_cpu_write(*p, overstep);
        }
 
-       if (IS_ENABLED(CONFIG_PREEMPT_RT))
-               preempt_enable();
+       preempt_enable_nested();
 }
 
 void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
@@ -1253,6 +1240,7 @@ const char * const vmstat_text[] = {
 #endif
 #ifdef CONFIG_NUMA_BALANCING
        "pgpromote_success",
+       "pgpromote_candidate",
 #endif
 
        /* enum writeback_stat_item counters */
@@ -1390,10 +1378,6 @@ const char * const vmstat_text[] = {
        "nr_tlb_local_flush_one",
 #endif /* CONFIG_DEBUG_TLBFLUSH */
 
-#ifdef CONFIG_DEBUG_VM_VMACACHE
-       "vmacache_find_calls",
-       "vmacache_find_hits",
-#endif
 #ifdef CONFIG_SWAP
        "swap_ra",
        "swap_ra_hit",
@@ -2068,7 +2052,6 @@ static int vmstat_cpu_online(unsigned int cpu)
 
        if (!node_state(cpu_to_node(cpu), N_CPU)) {
                node_set_state(cpu_to_node(cpu), N_CPU);
-               set_migration_target_nodes();
        }
 
        return 0;
@@ -2093,7 +2076,6 @@ static int vmstat_cpu_dead(unsigned int cpu)
                return 0;
 
        node_clear_state(node, N_CPU);
-       set_migration_target_nodes();
 
        return 0;
 }
@@ -2126,7 +2108,6 @@ void __init init_mm_internals(void)
 
        start_shepherd_timer();
 #endif
-       migrate_on_reclaim_init();
 #ifdef CONFIG_PROC_FS
        proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
        proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op);