diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/irq.h | 1 | ||||
| -rw-r--r-- | include/linux/mm.h | 28 | ||||
| -rw-r--r-- | include/linux/mm_types.h | 9 | ||||
| -rw-r--r-- | include/linux/pci.h | 1 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 14 |
5 files changed, 35 insertions, 18 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 92188b0225bb..51744bcf74ee 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -484,6 +484,7 @@ extern int irq_chip_set_affinity_parent(struct irq_data *data, | |||
| 484 | extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on); | 484 | extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on); |
| 485 | extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, | 485 | extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, |
| 486 | void *vcpu_info); | 486 | void *vcpu_info); |
| 487 | extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type); | ||
| 487 | #endif | 488 | #endif |
| 488 | 489 | ||
| 489 | /* Handling of unhandled and spurious interrupts: */ | 490 | /* Handling of unhandled and spurious interrupts: */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2e872f92dbac..bf6f117fcf4d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1003,6 +1003,34 @@ static inline int page_mapped(struct page *page) | |||
| 1003 | } | 1003 | } |
| 1004 | 1004 | ||
| 1005 | /* | 1005 | /* |
| 1006 | * Return true only if the page has been allocated with | ||
| 1007 | * ALLOC_NO_WATERMARKS and the low watermark was not | ||
| 1008 | * met implying that the system is under some pressure. | ||
| 1009 | */ | ||
| 1010 | static inline bool page_is_pfmemalloc(struct page *page) | ||
| 1011 | { | ||
| 1012 | /* | ||
| 1013 | * Page index cannot be this large so this must be | ||
| 1014 | * a pfmemalloc page. | ||
| 1015 | */ | ||
| 1016 | return page->index == -1UL; | ||
| 1017 | } | ||
| 1018 | |||
| 1019 | /* | ||
| 1020 | * Only to be called by the page allocator on a freshly allocated | ||
| 1021 | * page. | ||
| 1022 | */ | ||
| 1023 | static inline void set_page_pfmemalloc(struct page *page) | ||
| 1024 | { | ||
| 1025 | page->index = -1UL; | ||
| 1026 | } | ||
| 1027 | |||
| 1028 | static inline void clear_page_pfmemalloc(struct page *page) | ||
| 1029 | { | ||
| 1030 | page->index = 0; | ||
| 1031 | } | ||
| 1032 | |||
| 1033 | /* | ||
| 1006 | * Different kinds of faults, as returned by handle_mm_fault(). | 1034 | * Different kinds of faults, as returned by handle_mm_fault(). |
| 1007 | * Used to decide whether a process gets delivered SIGBUS or | 1035 | * Used to decide whether a process gets delivered SIGBUS or |
| 1008 | * just gets major/minor fault counters bumped up. | 1036 | * just gets major/minor fault counters bumped up. |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 0038ac7466fd..15549578d559 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -63,15 +63,6 @@ struct page { | |||
| 63 | union { | 63 | union { |
| 64 | pgoff_t index; /* Our offset within mapping. */ | 64 | pgoff_t index; /* Our offset within mapping. */ |
| 65 | void *freelist; /* sl[aou]b first free object */ | 65 | void *freelist; /* sl[aou]b first free object */ |
| 66 | bool pfmemalloc; /* If set by the page allocator, | ||
| 67 | * ALLOC_NO_WATERMARKS was set | ||
| 68 | * and the low watermark was not | ||
| 69 | * met implying that the system | ||
| 70 | * is under some pressure. The | ||
| 71 | * caller should try ensure | ||
| 72 | * this page is only used to | ||
| 73 | * free other pages. | ||
| 74 | */ | ||
| 75 | }; | 66 | }; |
| 76 | 67 | ||
| 77 | union { | 68 | union { |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8a0321a8fb59..860c751810fc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1202,6 +1202,7 @@ struct msix_entry { | |||
| 1202 | u16 entry; /* driver uses to specify entry, OS writes */ | 1202 | u16 entry; /* driver uses to specify entry, OS writes */ |
| 1203 | }; | 1203 | }; |
| 1204 | 1204 | ||
| 1205 | void pci_msi_setup_pci_dev(struct pci_dev *dev); | ||
| 1205 | 1206 | ||
| 1206 | #ifdef CONFIG_PCI_MSI | 1207 | #ifdef CONFIG_PCI_MSI |
| 1207 | int pci_msi_vec_count(struct pci_dev *dev); | 1208 | int pci_msi_vec_count(struct pci_dev *dev); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 22b6d9ca1654..9b88536487e6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1602,20 +1602,16 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | |||
| 1602 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1602 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
| 1603 | 1603 | ||
| 1604 | /* | 1604 | /* |
| 1605 | * Propagate page->pfmemalloc to the skb if we can. The problem is | 1605 | * Propagate page pfmemalloc to the skb if we can. The problem is |
| 1606 | * that not all callers have unique ownership of the page. If | 1606 | * that not all callers have unique ownership of the page but rely |
| 1607 | * pfmemalloc is set, we check the mapping as a mapping implies | 1607 | * on page_is_pfmemalloc doing the right thing(tm). |
| 1608 | * page->index is set (index and pfmemalloc share space). | ||
| 1609 | * If it's a valid mapping, we cannot use page->pfmemalloc but we | ||
| 1610 | * do not lose pfmemalloc information as the pages would not be | ||
| 1611 | * allocated using __GFP_MEMALLOC. | ||
| 1612 | */ | 1608 | */ |
| 1613 | frag->page.p = page; | 1609 | frag->page.p = page; |
| 1614 | frag->page_offset = off; | 1610 | frag->page_offset = off; |
| 1615 | skb_frag_size_set(frag, size); | 1611 | skb_frag_size_set(frag, size); |
| 1616 | 1612 | ||
| 1617 | page = compound_head(page); | 1613 | page = compound_head(page); |
| 1618 | if (page->pfmemalloc && !page->mapping) | 1614 | if (page_is_pfmemalloc(page)) |
| 1619 | skb->pfmemalloc = true; | 1615 | skb->pfmemalloc = true; |
| 1620 | } | 1616 | } |
| 1621 | 1617 | ||
| @@ -2263,7 +2259,7 @@ static inline struct page *dev_alloc_page(void) | |||
| 2263 | static inline void skb_propagate_pfmemalloc(struct page *page, | 2259 | static inline void skb_propagate_pfmemalloc(struct page *page, |
| 2264 | struct sk_buff *skb) | 2260 | struct sk_buff *skb) |
| 2265 | { | 2261 | { |
| 2266 | if (page && page->pfmemalloc) | 2262 | if (page_is_pfmemalloc(page)) |
| 2267 | skb->pfmemalloc = true; | 2263 | skb->pfmemalloc = true; |
| 2268 | } | 2264 | } |
| 2269 | 2265 | ||
