/* * Copyright (C) International Business Machines Corp., 2000-2002 * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _H_JFS_METAPAGE #define _H_JFS_METAPAGE #include struct metapage { /* Common logsyncblk prefix (see jfs_logmgr.h) */ u16 xflag; u16 unused; lid_t lid; int lsn; struct list_head synclist; /* End of logsyncblk prefix */ unsigned long flag; /* See Below */ unsigned long count; /* Reference count */ void *data; /* Data pointer */ sector_t index; /* block address of page */ wait_queue_head_t wait; /* implementation */ struct page *page; unsigned int logical_size; /* Journal management */ int clsn; int nohomeok; struct jfs_log *log; }; /* metapage flag */ #define META_locked 0 #define META_dirty 2 #define META_sync 3 #define META_discard 4 #define META_forcewrite 5 #define META_io 6 #define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag) /* function prototypes */ extern int metapage_init(void); extern void metapage_exit(void); extern struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, unsigned int size, int absolute, unsigned long new); #define read_metapage(inode, lblock, size, absolute)\ __get_metapage(inode, lblock, size, absolute, false) #define get_metapage(inode, lblock, size, absolute)\ __get_metapage(inode, lblock, size, absolute, true) extern void release_metapage(struct metapage *); extern void grab_metapage(struct metapage *); extern void force_metapage(struct metapage *); /* * hold_metapage and put_metapage are used in conjunction. The page lock * is not dropped between the two, so no other threads can get or release * the metapage */ extern void hold_metapage(struct metapage *); extern void put_metapage(struct metapage *); static inline void write_metapage(struct metapage *mp) { set_bit(META_dirty, &mp->flag); release_metapage(mp); } static inline void flush_metapage(struct metapage *mp) { set_bit(META_sync, &mp->flag); write_metapage(mp); } static inline void discard_metapage(struct metapage *mp) { clear_bit(META_dirty, &mp->flag); set_bit(META_discard, &mp->flag); release_metapage(mp); } static inline void metapage_nohomeok(struct metapage *mp) { struct page *page = mp->page; lock_page(page); if (!mp->nohomeok++) { mark_metapage_dirty(mp); get_page(page); wait_on_page_writeback(page); } unlock_page(page); } /* * This serializes access to mp->lsn when metapages are added to logsynclist * without setting nohomeok. i.e. updating imap & dmap */ static inline void metapage_wait_for_io(struct metapage *mp) { if (test_bit(META_io, &mp->flag)) wait_on_page_writeback(mp->page); } /* * This is called when already holding the metapage */ static inline void _metapage_homeok(struct metapage *mp) { if (!--mp->nohomeok) put_page(mp->page); } static inline void metapage_homeok(struct metapage *mp) { hold_metapage(mp); _metapage_homeok(mp); put_metapage(mp); } extern const struct address_space_operations jfs_metapage_aops; /* * This routines invalidate all pages for an extent. */ extern void __invalidate_metapages(struct inode *, s64, int); #define invalidate_pxd_metapages(ip, pxd) \ __invalidate_metapages((ip), addressPXD(&(pxd)), lengthPXD(&(pxd))) #define invalidate_dxd_metapages(ip, dxd) \ __invalidate_metapages((ip), addressDXD(&(dxd)), lengthDXD(&(dxd))) #define invalidate_xad_metapages(ip, xad) \ __invalidate_metapages((ip), addressXAD(&(xad)), lengthXAD(&(xad))) #endif /* _H_JFS_METAPAGE */ info' class='commit-info'> authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 21:58:13 -0800 committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 21:58:13 -0800 commite7aa8c2eb11ba69b1b69099c3c7bd6be3087b0ba (patch) treef63906f41699c8e38af9d12b063e2ceab0286ef2 /tools/perf/pmu-events/arch/x86/silvermont parente34bac726d27056081d0250c0e173e4b155aa340 (diff)parent868c97a846a73e937d835b09b8c885a69df50ec8 (diff)
Merge tag 'docs-4.10' of git://git.lwn.net/linuxHEADmaster
Pull documentation update from Jonathan Corbet: "These are the documentation changes for 4.10. It's another busy cycle for the docs tree, as the sphinx conversion continues. Highlights include: - Further work on PDF output, which remains a bit of a pain but should be more solid now. - Five more DocBook template files converted to Sphinx. Only 27 to go... Lots of plain-text files have also been converted and integrated. - Images in binary formats have been replaced with more source-friendly versions. - Various bits of organizational work, including the renaming of various files discussed at the kernel summit. - New documentation for the device_link mechanism. ... and, of course, lots of typo fixes and small updates" * tag 'docs-4.10' of git://git.lwn.net/linux: (193 commits) dma-buf: Extract dma-buf.rst Update Documentation/00-INDEX docs: 00-INDEX: document directories/files with no docs docs: 00-INDEX: remove non-existing entries docs: 00-INDEX: add missing entries for documentation files/dirs docs: 00-INDEX: consolidate process/ and admin-guide/ description scripts: add a script to check if Documentation/00-INDEX is sane Docs: change sh -> awk in REPORTING-BUGS Documentation/core-api/device_link: Add initial documentation core-api: remove an unexpected unident ppc/idle: Add documentation for powersave=off Doc: Correct typo, "Introdution" => "Introduction" Documentation/atomic_ops.txt: convert to ReST markup Documentation/local_ops.txt: convert to ReST markup Documentation/assoc_array.txt: convert to ReST markup docs-rst: parse-headers.pl: cleanup the documentation docs-rst: fix media cleandocs target docs-rst: media/Makefile: reorganize the rules docs-rst: media: build SVG from graphviz files docs-rst: replace bayer.png by a SVG image ...
Diffstat (limited to 'tools/perf/pmu-events/arch/x86/silvermont')