@@ -661,6 +661,7 @@ typedef struct pglist_data {
enum zone_type kswapd_classzone_idx;
int kswapd_failures; /* Number of 'reclaimed == 0' runs */
+ spinlock_t pinned_dma_lock;
#ifdef CONFIG_COMPACTION
int kcompactd_max_order;
@@ -730,6 +731,11 @@ static inline spinlock_t *zone_lru_lock(struct zone *zone)
return &zone->zone_pgdat->lru_lock;
}
+static inline spinlock_t *zone_gup_lock(struct zone *zone)
+{
+ return &zone->zone_pgdat->pinned_dma_lock;
+}
+
static inline struct lruvec *node_lruvec(struct pglist_data *pgdat)
{
return &pgdat->lruvec;
@@ -6225,6 +6225,7 @@ static void __meminit pgdat_init_internals(struct pglist_data *pgdat)
pgdat_page_ext_init(pgdat);
spin_lock_init(&pgdat->lru_lock);
+ spin_lock_init(&pgdat->pinned_dma_lock);
lruvec_init(node_lruvec(pgdat));
}