Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753626AbcLKM6x (ORCPT ); Sun, 11 Dec 2016 07:58:53 -0500 Received: from mail-bl2nam02on0087.outbound.protection.outlook.com ([104.47.38.87]:32194 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753502AbcLKM6p (ORCPT ); Sun, 11 Dec 2016 07:58:45 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov CC: Yury Norov , Arnd Bergmann , "Dr. Philipp Tomsich" , Catalin Marinas , , , LKML , , , , "Joseph S. Myers" , , "Kapoor, Prasun" , Alexander Graf , , , , Andrew Pinski , , Alexey Klimov , , "Zhangjian (Bamvor)" , linux-arm-kernel , Maxim Kuvyrkov , Nathan Lynch , Martin Schwidefsky , , Subject: [PATCH 3/3] mm: make pagoff_t type 64-bit Date: Sun, 11 Dec 2016 18:26:42 +0530 Message-ID: <1481461003-14361-4-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com> References: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.125.246.42] X-ClientProxiedBy: VI1P194CA0007.EURP194.PROD.OUTLOOK.COM (10.175.178.17) To BN4PR07MB2244.namprd07.prod.outlook.com (10.164.63.150) X-MS-Office365-Filtering-Correlation-Id: 54ebd8e3-b422-42ad-274e-08d421c56e33 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN4PR07MB2244; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2244;3:alhyybiEsFcaZAkGDU0/ZREnT9bVfz1J5PDA6GdGpGN7XaaGhhU72ooIOYD9Lr4XOrsndUm8QowNZXZPP8dpopjhLcGc/zeSDTpepZAtpPNKgpNh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ange-Diagnostics: 1;BN4PR07MB2244;31:hYOwkOSeul3il2pKsNUESgdJxEyG06UWe4A3fLypF6CmPt+TlMW1ZqhFrBtz8pz9hXCopLdy/xn9q8GM6soy2S/b85kxNVFwxJHnQdQWjdAVA5M3fVFCAK2ImBLO78JbZTDDL8QoMkhpXsePT77k0ivCh58fH91EUiL6enVbh8Lk3M+0ZUYGKpXLRv91W7DgOb0A6cIOq4cDnAedoOctoIFvJgAbYDachve/5zyHxS8G/E5QmIX/f/AXh4QLwl+T;20:o1h3gZUnZW9l6S7WVW8ZY7oGY6NjNW88DIXxOVbX7JH/SFcT8A/acVRqRKLO6gAP+qa3CUtfSqv6Lj+LVGlax9cpuVnH8kPyvA0HXR2rGQG5DlQNh9XwVt3Nf+H0pv6MmYwEy1uEFb3V4YjcnR08mHP4lLZgTxndy113mtuN7kELVPhuEtpPQIuyksqOLlBNIK+PLsCEaUe134reAzYDPK4MemcAH1Cq9xk7a/tHq4bBaYAZsshDNdwtXz2yp2RcMdWRBmit4jBLtCHuFUBkawjt7uP5owUjozJgeOSJv6nwn6/w74vOEjiqi16/2xAK5OHWRWBtammH6FpHB9UItZwVtrx4TWI9Oe1V4xtbY1X5EBiC6m6p3p7XHI1o6xkoXWoF98kOzH9tMhlnVJp9u7omNOE+w+9ZUfXgHHcAEm0TrLlk5JqvKcFlmREM33y+qglrAKzUQXnijRtm9kxyrhiI1zNO7/OhWIkEBpot4/yMnm/lIIyCQ5ZuMzIwrSHEeA1kco5AqXsLPjhnYbXPukJVw574KWXElXrjbr/VXnHllAPsRK67Ke5upiYaP0uT/rWaTCBmtAjgkd4jfV1w0cIJBKG4clcI4xlY5qWtuG8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(6072148);SRVR:BN4PR07MB2244;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2244; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2244;4:V2GYIazpmqc09BG6JO6wruPh4156zJtnzcEORdYj6yZldq9yWXKHT984Vgb6iPFzXR3JDMD0vdaI4O5TbrtUa4UzXEPQxrOpVoY76X8Q4UVL6UtYqZmzt5/I+RVmUx1eHxMmrZci9X9O2foAr0gVujZjuD3yqtCvAwVciGllDizqpOd+lo3q486fcTUKCBeAmxoB+MgSDI5a84eGVE9P3iGYdXqNDHHtEqJB71Wpu45NOa4ODUr74nNjicbWTWeFSyDIPV8m9mABb09NbdE4y2fCqYrzJmy8PnfE/Iw2J8n7BtEj50l+rcvfYxOiHZ693WgE5ussRhGOjTuao9gbxs3YGJcFJSJL6iyWsQ4bxk1o6OOasWz8Z0ocTLnapEu4bvhmQ7Of1nkzCX5p1SFg/skaSMgTv+RKE4v5feJ6JNXHQnra3OY0JEPDgjFQsRRd4s7suJM9yJr53FOPMmfeS4XBnl4Px2tTFrWT6u+0a0vwAou/7v8QnVwLvZyoufGKpUVGoPKrZVLCXskUd+eiDZFko1tRPRgfZj9dEOeXGsq59RofQxchCOAH7nWFW6WtFTF1fBZKV6yAC1jsQUt+4Q== X-Forefront-PRVS: 0153A8321A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39840400002)(39450400003)(39410400002)(189002)(199003)(7416002)(50986999)(42186005)(39060400001)(92566002)(109986004)(68736007)(8676002)(81156014)(47776003)(66066001)(81166006)(189998001)(97736004)(2906002)(5009440100003)(3846002)(6666003)(38730400001)(50226002)(6496003)(6486002)(4326007)(6116002)(5660300001)(110136003)(305945005)(7736002)(105586002)(1671002)(106356001)(2950100002)(5003940100001)(50466002)(76506005)(48376002)(101416001)(36756003)(33646002)(76176999)(266003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2244;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN4PR07MB2244;23:QmJSVufIrynEhjvs8px+I7+cvjVIydlHdUx0ELSL+?= =?us-ascii?Q?t9XpZgCMnqEZ0M//XLwwh0QvRxTq6wn9c5nlz8nw447Zt7gRz22OYAYvYf0+?= =?us-ascii?Q?O3s2TbQjmHlSugWJjGlaG0BdrTuetVIv5V3v1gEbYtuIZfas4QK8SDJeXAtZ?= =?us-ascii?Q?bFH0cxyAXZwIaBlk4dhiC1HztpYr7n2w7OiTPAQs4+r1T45o9VNO9dMZsxwJ?= =?us-ascii?Q?5e2nOLoQnCKsrrca4JHt482i1S1VzF8IfKpm1b0gSAnJWnDnAG6Or2YUoe6m?= =?us-ascii?Q?8/34fqAA07r0e5PL6i5GdjZOcerFpDUYecgCYGwkgX2swDBCZW4Ud65aaNkR?= =?us-ascii?Q?95ncr2m2swRpRTC7x70iXeqTUOOO8ZGFrA5nRY8PQTCCv3pgqFcvvcBIbdl6?= =?us-ascii?Q?OsC9QtlOfC4vXmjTId0bMrF6UlcNF8wE8CVfXrrHPUee5I65EpPLZL5Q83Xx?= =?us-ascii?Q?UTkpHY3BCOvEhc9g/E4FEUeYv9pMdO6JzKYLrA7uY2tQlLAxHqZCGCMV68ir?= =?us-ascii?Q?0Ubfdu/2b1v5QKExgPatLvYpdEzUg6uJUApKxfSuRr+PfI4759CdQl9soqdp?= =?us-ascii?Q?8JQpcclyQFzeJS5f10R7eAaSWCGBBBAZr0U3+hthfA/1h9asQn5ZOVfieN4O?= =?us-ascii?Q?OM7bMvcQM9QBzk48o860WW4xU1VQ7KVig6OVwJLDwQiGL68cP0QWlbELR6ba?= =?us-ascii?Q?RVXfMARrI7FWNDmd6JClwkig3yBjuVq1LoPHnkoJ1Z/BzY4W0oYGj37cCcV+?= =?us-ascii?Q?ATej4TEbcDdObNG1jrLOvsnftCJz+sa/3Ypo/UaQxj6mtyZLVWh/p81oTM1f?= =?us-ascii?Q?ufxglrbPO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5ETjcrku+17V+XHrC8nnQ9XQcGxIIsi7J3kH70hiPalwDNa9f28lWRduC9DH2z5P1es=;24:xPBbZdCrGqrDMzcMk9FAQY5rzWJTzlPX1PAEaA2BaGXHk24tjCFjKWr7zFNI4pb+bET5xiXZCQ0mpDEeAPShyntHYQMnO0hA12iLFnu8zMo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2244;7:j2NHmgG8+/LCRJOzypNZxbNhajV86LZgXNDRxVpdspaNrh3jVoqxdW4okx7M9EwJMwTRAub9/3eq18ycwqVHefkTSacliirQ3E28jS16Id2NrE1AQyc/Y6mvai1F7LgVUExDTsRxrpLg7miH0CRaMFCFNSvruhZfQzevO9BSq1lw3hgRjF9hwiE8MuSKnOWAa7xaxhB8Ep7ymb5wJuU/T7H1K2/P6BWA1B81TAa+ST1YmdB9SqFCH9aFDdzwSlPuNrbB7UKvJ/mpGAntmctzIxabL5kVVIaH9TR4o/ii3KOeroN6fx3MOWFhRbEymH4TjFcGm+hxeQJooYt3PiZMXvOsyKCu69q5VgCpoEWR+S8KdaMwxhgQzgEnwlE3xEJRXnvTIjQM8skcyCCsI74LaWEJaOlez0IJ6d/46HSQbyEG8PmFRlcurSooKA6Xog4ljAxWrURvvi/YOVUfoTEdpA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2016 12:58:38.7206 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2244 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 11292 Lines: 292 Also fix related interfaces Signed-off-by: Yury Norov --- fs/btrfs/extent_io.c | 2 +- fs/ext2/dir.c | 4 ++-- include/linux/mm.h | 9 +++++---- include/linux/radix-tree.h | 8 ++++---- include/linux/types.h | 2 +- lib/radix-tree.c | 8 ++++---- mm/debug.c | 2 +- mm/internal.h | 2 +- mm/memory.c | 4 ++-- mm/mmap.c | 7 ++++--- mm/readahead.c | 4 ++-- mm/util.c | 3 ++- 12 files changed, 29 insertions(+), 26 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 8ed05d9..f4c9318 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3436,7 +3436,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, set_range_writeback(tree, cur, cur + iosize - 1); if (!PageWriteback(page)) { btrfs_err(BTRFS_I(inode)->root->fs_info, - "page %lu not writeback, cur %llu end %llu", + "page %llu not writeback, cur %llu end %llu", page->index, cur, end); } diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index d9650c9..c01b76e 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -174,7 +174,7 @@ static bool ext2_check_page(struct page *page, int quiet) error = "inode out of bounds"; bad_entry: if (!quiet) - ext2_error(sb, __func__, "bad entry in directory #%lu: : %s - " + ext2_error(sb, __func__, "bad entry in directory #%llu: : %s - " "offset=%lu, inode=%lu, rec_len=%d, name_len=%d", dir->i_ino, error, (page->index<inode), @@ -184,7 +184,7 @@ static bool ext2_check_page(struct page *page, int quiet) if (!quiet) { p = (ext2_dirent *)(kaddr + offs); ext2_error(sb, "ext2_check_page", - "entry in directory #%lu spans the page boundary" + "entry in directory #%llu spans the page boundary" "offset=%lu, inode=%lu", dir->i_ino, (page->index<inode)); diff --git a/include/linux/mm.h b/include/linux/mm.h index a92c8d7..33d9150 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2022,19 +2022,20 @@ extern int install_special_mapping(struct mm_struct *mm, unsigned long addr, unsigned long len, unsigned long flags, struct page **pages); -extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); +extern unsigned long get_unmapped_area(struct file *, unsigned long, + unsigned long, pgoff_t, unsigned long); extern unsigned long mmap_region(struct file *file, unsigned long addr, - unsigned long len, vm_flags_t vm_flags, unsigned long pgoff); + unsigned long len, vm_flags_t vm_flags, pgoff_t pgoff); extern unsigned long do_mmap(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, - vm_flags_t vm_flags, unsigned long pgoff, unsigned long *populate); + vm_flags_t vm_flags, pgoff_t pgoff, unsigned long *populate); extern int do_munmap(struct mm_struct *, unsigned long, size_t); static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, - unsigned long pgoff, unsigned long *populate) + pgoff_t pgoff, unsigned long *populate) { return do_mmap(file, addr, len, prot, flags, 0, pgoff, populate); } diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index af3581b..1781bb7 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -287,7 +287,7 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items); unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root, - void ***results, unsigned long *indices, + void ***results, unsigned long long *indices, unsigned long first_index, unsigned int max_items); int radix_tree_preload(gfp_t gfp_mask); int radix_tree_maybe_preload(gfp_t gfp_mask); @@ -308,7 +308,7 @@ radix_tree_gang_lookup_tag_slot(struct radix_tree_root *root, void ***results, unsigned long first_index, unsigned int max_items, unsigned int tag); unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, - unsigned long *first_indexp, unsigned long last_index, + unsigned long long *first_indexp, unsigned long last_index, unsigned long nr_to_tag, unsigned int fromtag, unsigned int totag); int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); @@ -335,8 +335,8 @@ static inline void radix_tree_preload_end(void) * radix tree tag. */ struct radix_tree_iter { - unsigned long index; - unsigned long next_index; + unsigned long long index; + unsigned long long next_index; unsigned long tags; #ifdef CONFIG_RADIX_TREE_MULTIORDER unsigned int shift; diff --git a/include/linux/types.h b/include/linux/types.h index baf7183..1e711c1 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -137,7 +137,7 @@ typedef unsigned long blkcnt_t; /* * The type of an index into the pagecache. */ -#define pgoff_t unsigned long +#define pgoff_t unsigned long long /* * A dma_addr_t can hold any valid DMA address, i.e., any address returned diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 0d1d23e..afb49381 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -97,7 +97,7 @@ static inline unsigned long get_slot_offset(struct radix_tree_node *parent, } static unsigned int radix_tree_descend(struct radix_tree_node *parent, - struct radix_tree_node **nodep, unsigned long index) + struct radix_tree_node **nodep, unsigned long long index) { unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK; void **entry = rcu_dereference_raw(parent->slots[offset]); @@ -1040,14 +1040,14 @@ EXPORT_SYMBOL(radix_tree_next_chunk); * be prepared to handle that. */ unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, - unsigned long *first_indexp, unsigned long last_index, + unsigned long long *first_indexp, unsigned long last_index, unsigned long nr_to_tag, unsigned int iftag, unsigned int settag) { struct radix_tree_node *parent, *node, *child; unsigned long maxindex; unsigned long tagged = 0; - unsigned long index = *first_indexp; + unsigned long long index = *first_indexp; radix_tree_load_root(root, &child, &maxindex); last_index = min(last_index, maxindex); @@ -1195,7 +1195,7 @@ EXPORT_SYMBOL(radix_tree_gang_lookup); */ unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root, - void ***results, unsigned long *indices, + void ***results, unsigned long long *indices, unsigned long first_index, unsigned int max_items) { struct radix_tree_iter iter; diff --git a/mm/debug.c b/mm/debug.c index 9feb699..a568fc8 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -49,7 +49,7 @@ void __dump_page(struct page *page, const char *reason) */ int mapcount = PageSlab(page) ? 0 : page_mapcount(page); - pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx", + pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#llx", page, page_ref_count(page), mapcount, page->mapping, page_to_pgoff(page)); if (PageCompound(page)) diff --git a/mm/internal.h b/mm/internal.h index 537ac99..8027eac 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -447,7 +447,7 @@ extern u32 hwpoison_filter_enable; extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long, unsigned long, unsigned long, - unsigned long, unsigned long); + unsigned long, pgoff_t); extern void set_pageblock_order(void); unsigned long reclaim_clean_pages_from_list(struct zone *zone, diff --git a/mm/memory.c b/mm/memory.c index e18c57b..c05d534 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -688,7 +688,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, (long long)pte_val(pte), (long long)pmd_val(*pmd)); if (page) dump_page(page, "bad pte"); - pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n", + pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%llx\n", (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); /* * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y @@ -3133,7 +3133,7 @@ static int do_fault_around(struct fault_env *fe, pgoff_t start_pgoff) end_pgoff = start_pgoff - ((fe->address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) + PTRS_PER_PTE - 1; - end_pgoff = min3(end_pgoff, vma_pages(fe->vma) + fe->vma->vm_pgoff - 1, + end_pgoff = min3(end_pgoff, (pgoff_t) vma_pages(fe->vma) + fe->vma->vm_pgoff - 1, start_pgoff + nr_pages - 1); if (pmd_none(*fe->pmd)) { diff --git a/mm/mmap.c b/mm/mmap.c index 6c6b95a..cf50232 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -9,6 +9,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include +#include #include #include #include @@ -1304,7 +1305,7 @@ static inline int mlock_future_check(struct mm_struct *mm, unsigned long do_mmap(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, vm_flags_t vm_flags, - unsigned long pgoff, unsigned long *populate) + pgoff_t pgoff, unsigned long *populate) { struct mm_struct *mm = current->mm; int pkey = 0; @@ -1624,7 +1625,7 @@ static inline int accountable_mapping(struct file *file, vm_flags_t vm_flags) } unsigned long mmap_region(struct file *file, unsigned long addr, - unsigned long len, vm_flags_t vm_flags, unsigned long pgoff) + unsigned long len, vm_flags_t vm_flags, pgoff_t pgoff) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma, *prev; @@ -2088,7 +2089,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, unsigned long get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, - unsigned long pgoff, unsigned long flags) + pgoff_t pgoff, unsigned long flags) { unsigned long (*get_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); diff --git a/mm/readahead.c b/mm/readahead.c index c8a955b..902bad8 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -332,8 +332,8 @@ static pgoff_t count_history_pages(struct address_space *mapping, static int try_context_readahead(struct address_space *mapping, struct file_ra_state *ra, pgoff_t offset, - unsigned long req_size, - unsigned long max) + unsigned long long req_size, + unsigned long long max) { pgoff_t size; diff --git a/mm/util.c b/mm/util.c index 1a41553..51fae99 100644 --- a/mm/util.c +++ b/mm/util.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -292,7 +293,7 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast); unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, - unsigned long flag, unsigned long pgoff) + unsigned long flag, pgoff_t pgoff) { unsigned long ret; struct mm_struct *mm = current->mm; -- 2.7.4