11dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project/****************************************************************************
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ****************************************************************************
31dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***
41dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***   This header was automatically generated from a Linux kernel header
51dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***   of the same name, to make information necessary for userspace to
61dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***   call into the kernel available to libc.  It contains only constants,
71dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***   structures, and macros generated from the original header, and thus,
81dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***   contains no copyrightable information.
91dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ***
10654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***   To edit the content of this header, modify the corresponding
11654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***   run bionic/libc/kernel/tools/update_all.py
13654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***
14654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***   Any manual change here will be lost the next time this script will
15654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***   be run. You've been warned!
16654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng ***
171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ****************************************************************************
181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project ****************************************************************************/
191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#ifndef _LINUX_BACKING_DEV_H
201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define _LINUX_BACKING_DEV_H
211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#include <asm/atomic.h>
221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectenum bdi_state {
23654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project BDI_pdflush,
251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project BDI_write_congested,
261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project BDI_read_congested,
271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project BDI_unused,
28654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projecttypedef int (congested_fn)(void *, int);
311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectstruct backing_dev_info {
321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unsigned long ra_pages;
33654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
341dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unsigned long state;
351dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project unsigned int capabilities;
361dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project congested_fn *congested_fn;
371dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project void *congested_data;
38654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
391dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
401dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project void *unplug_io_data;
411dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
42c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
43654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_NO_WRITEBACK 0x00000002
45c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_MAP_COPY 0x00000004
46c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_MAP_DIRECT 0x00000008
47c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_READ_MAP 0x00000010
48654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_WRITE_MAP 0x00000020
50c95eb57405d3d2f0e6cfab313aa74b1bad280452Elliott Hughes#define BDI_CAP_EXEC_MAP 0x00000040
511dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define BDI_CAP_VMFLAGS   (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#if defined(VM_MAYREAD) && BDI_CAP_READ_MAP != (VM_MAYREAD || BDI_CAP_WRITE_MAP != (VM_MAYWRITE || BDI_CAP_EXEC_MAP != VM_MAYEXEC))
53654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
541dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#error please change backing_dev_info::capabilities flags
551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#endif
561dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define bdi_cap_writeback_dirty(bdi)   (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
571dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define bdi_cap_account_dirty(bdi)   (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
58654325de026a2ca5b76b8b40e576c959d8211fdcBen Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
591dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define mapping_cap_writeback_dirty(mapping)   bdi_cap_writeback_dirty((mapping)->backing_dev_info)
601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define mapping_cap_account_dirty(mapping)   bdi_cap_account_dirty((mapping)->backing_dev_info)
611dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#endif
62