-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathmm_modules_091_100_kern-3.10.5.patch
7016 lines (6884 loc) · 206 KB
/
mm_modules_091_100_kern-3.10.5.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -Nau8r ./linux-mri/.config ./linux-3.10.5/.config
--- ./linux-mri/.config 2013-08-18 16:26:30.263709183 -0700
+++ ./linux-3.10.5/.config 2013-08-04 19:59:21.950925637 -0700
@@ -397,18 +397,16 @@
CONFIG_SPARSEMEM=y
CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_HAVE_MEMBLOCK=y
-CONFIG_MM_MODULES=y
-CONFIG_PMEM_MODULES=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
# CONFIG_MOVABLE_NODE is not set
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_BALLOON_COMPACTION=y
diff -Nau8r ./linux-mri/.config.old ./linux-3.10.5/.config.old
--- ./linux-mri/.config.old 2013-08-18 13:50:23.577429250 -0700
+++ ./linux-3.10.5/.config.old 2013-08-04 19:53:48.183052944 -0700
@@ -602,16 +602,17 @@
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_ACPI is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
# CONFIG_RAPIDIO is not set
+# CONFIG_RAPIDIO_ENUM_BASIC is not set
#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
diff -Nau8r ./linux-mri/.version ./linux-3.10.5/.version
--- ./linux-mri/.version 2013-08-18 19:42:56.654256214 -0700
+++ ./linux-3.10.5/.version 2013-08-04 20:33:35.568153604 -0700
@@ -1 +1 @@
-8
+2
diff -Nau8r ./linux-mri/Documentation/mm_modules.txt ./linux-3.10.5/Documentation/mm_modules.txt
--- ./linux-mri/Documentation/mm_modules.txt 2013-08-18 16:49:39.841444992 -0700
+++ ./linux-3.10.5/Documentation/mm_modules.txt 1969-12-31 16:00:00.000000000 -0800
@@ -1,283 +0,0 @@
-Virtual (MM_MODULES) and Physical (PMEM_MODULES) modules for Linux 3.10
-
- Gil Tene <[email protected]>
-
-In order to support extended functionality for virtual and physical memory,
-enabling loadable modules to deliver integrated memory management
-functionality is desirable.
-
-Examples of valuable extended functionality can include:
-
-- Support for mappings with multiple and mixed page sizes
- - Including transitioning of mapped addresses from large to small page
- mappings, or small to large.
-- Support for very high sustained mapping modification rates:
- - Allowing concurrent modifications within the same address space
- - Allowing user to [safely] indicate lazy TLB invalidation and
- thereby dramatically reduce per change costs
- - Supporting fast, safe application of very large "batch" sets
- of mapping modifications (remaps and mprotects), such that
- all changes become visible within the same, extremely short
- period of time.
-- Support for large number of disjoint mappings with arbitrary manipulations
- at high rates
-
-In order to support such functionality, memory management modules need
-to interact with several points in the virtual and physical memory systems
-that are "lower" that those of a typical module or driver under previously
-kernel interfaces. The specific interface points are itemized below.
-
-A set of proposed patches against the 3.10 is provided,
-which creates the appropriate interfaces for module to register with,
-allowing them to interact with vmas, mm structures and pages through
-their needed lifecycle transitions, as well as keep state they
-may need associated with vmas and mm structures.
-
-----------------------------------------------------------------------
-
-At a high level, the patches represent:
-
-Changes to existing data structures:
-
-- An added "mm_modules" field to struct mm_struct.
-
-- Two added fields to "mm_module_ops" struct vm_area_struct.
-
-New data structures:
-
-- Four new common data types (struct mm_module_struct,
- struct pmem_module_struct, struct pmem_module_operations_struct,
- mm_module_operations_struct)
-
-Code changes:
-
-- changes to add calls into mm_module_ops and pmem_module_ops at
- various appropriate locations.
-
-- changes to disable or make invalid certain operations (e.g. vma
- split, merge, remap) for vmas that are controlled by mm_modules
-
-- A change to fault handling to allow handle_mm_fault to return
- an indication for SEGV_MAPERR or SEGV_ACCERR (allow for sparsely
- mapped, and non-homogeneously protected vmas).
-
-- A change to gup_fast (arch/x86/mm/gup.c) to make it safely independent
- of any page table locking and invalidation schemes (as long as whatever
- they do is safe in an SMP environment), including mechanisms that
- may ref-count pages down to 0 before tlb-invalidating their mappings.
-
-----------------------------------------------------------------------
-Note: about need for physical memory support:
-
-While virtual memory functionality alone can support some of the
-possible extended functionality, high performance functionality
-requires physical memory management and control as well. A good example
-of this is in-process recycling of memory and in-process memory free
-lists and their use in dramatically dampening TLB invalidate requirements
-on allocation or deallocation edges. When a system need to sustain
-a high rate of new mappings (e.g. 20GB/sec of sustained random, disjoint
-map/remap/unmap operations), such in-process physical memory free lists
-become a must.
-
-----------------------------------------------------------------------
-Note: About hugetlb
-
-To increase the likelihood of usefulness to generic virtual memory
-functionality additions, the module interface was designed such that
-the all current hugetlb functionality could be developed as a loadable
-kernel module under the proposed interface.
-
-----------------------------------------------------------------------
-
-Some high level design points:
-
-- Virtual memory modules (mm_modules) are generally responsible for
-creating and controlling their own vmas. [whole] vmas can be torn down
-by the kernel.
-
-- The kernel's "normal" memory manipulation system calls will not modify
-the bounds of an mm_module managed vma. [i.e. no merging, no splitting,
-no remapping]. mm_modules may support such functionality through their own
-entry points.
-
-- mm_modules must adhere to the kernel's convention for locking the
-page table hierarchy for any part of the hierarchy that may be manipulated
-by other code. While mm_modules may apply private locking schemes
-to parts of the hierarchy (e.g. below the pmd level), they must do
-so only with parts of the hierarchy that are know to be completely owned
-by the module. [e.g. 2MB aligned vmas can separately control locking at
-the pmd level and below]
-
-- mm_modules can carry unique state per mm, and unique state per vma.
-
-- mm_modules provide their own fault handling functionality. They may
- indicate a need to SEGV with a mapping or protection si_code (sparsely
- mapped vas are a good example of this need).
-
-- pmem_modules manage their own lists of physical pages, and are expected
- to be aware of physical pages that they are supposed to control, even
- when (and especially when) those pages carry a 0 ref count.. They can
- do so in any way they want (e.g. a module-private vmemmap mirror, or
- one using much larger aligned page sizes).
-
-- registered pmem_modules intercept all physical page releases at
- put_page() and release_pages(), such that when a page is ref-counted down
- to 0, the pmem_module would pick it up before it reaches the system's
- normal free lists.
-
-- pmem_modules are expected to support hot_plug functionality. When physical
- memory is added to the system, all current pmem_modules must adjust their
- internal maps of physical memory to be able to correctly handle physical
- pages of the newly discovered range.
-
-----------------------------------------------------------------------
-Virtual Memory Module Interface Points:
-
-Fault handling:
- int (*handle_mm_fault)(struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr,
- int write_access);
-
- Called from handle_mm_fault() for vmas managed by the mm_module to
- satisfy fault handling needs. May return an indication of SEGV_ACCERR
- or SEGV_MAPERR if fault address is not mapped (e.g. for sparsely
- populated vmas).
-
-Protection changes:
- int (*change_protection)(struct vm_area_struct *vma, unsigned long start,
- unsigned long end, unsigned long newflags);
-
- Called from mprotect_fixup() to change the protection of all mapped
- pages within a vma managed by the mm_module. [needed for e.g. hugetlb
- interaction with mprotect()]. Note: the module may (and likely will)
- provide it's own, finer grain protection control calls.
-
-Page range duplication:
- int (*copy_page_range)(struct mm_struct *dst_mm,
- struct mm_struct *src_mm, struct vm_area_struct *vma);
-
- Called from copy_page_range() to duplicate a vma managed by an mm_module
- from a src_mm to a dst_mm. Used for specialized forking behavior.
-
-Page following:
- int (*follow_page)(struct mm_struct *mm, struct vm_area_struct *vma,
- struct page **pages, struct vm_area_struct **vmas,
- unsigned long *position, int *length,
- int i, int write);
-
- Called from get_user_pages() to get a vector of pages associated with a
- range of addresses within a vma managed by the mm_module. Required
- for core dumping, gdb, etc.
-
-Probe mapping protection and range:
- int (*probe_mapped)(struct vm_area_struct *vma, unsigned long start,
- unsigned long *end_range, unsigned long *range_vm_flags);
-
- return an indication of whether an address within a vma is mapped or
- not, along with it's protection and the range of identical protection
- mapping. Used by core dump functionality (e.g. elf_core_dump()) for
- efficient traversal and dumping of very large and sparsely populated
- vmas (e.g. 16TB vma containing 300MB of mapped data).
-
-Unmapping:
- unsigned long (*unmap_page_range)(struct mmu_gather **tlbp,
- struct vm_area_struct *vma, unsigned long addr,
- unsigned long end, struct zap_details *details);
-
- Called by unmap_vmas() to unmap and release all pages with a vma
- managed by the mm_module.
-
- void (*free_pgd_range)(struct mmu_gather *tlb, unsigned long addr,
- unsigned long end, unsigned long floor,
- unsigned long ceiling);
-
- Called by free_pgtables() to tear down all page table hierarchy
- storage associated with a vma managed by the mm_module.
-
-vma lifecycle:
- int (*init_module_vma)(struct vm_area_struct *vma,
- struct vm_area_struct *old_vma);
-
- Called by dup_mmap() to initialize the mm_module state associated with
- a newly duplicated vma managed by the mm_module.
-
- void (*exit_module_vma)(struct vm_area_struct *vma);
-
- Called by remove_vma() to tear down the mm_module state associated with
- the vma managed by the mm_module.
-
-mm lifecycle:
- int (*init_module_mm)(struct mm_struct *mm,
- struct mm_module_struct *mm_mod);
-
- Called from mm_init to initialize the mm_module state associated with a
- newly duplicated mm.
-
- int (*exit_module_mm)(struct mm_struct *mm,
- struct mm_module_struct *mm_mod);
-
- Called by mmput to tear down the mm_module state associated with an mm
-
-struct mm_module_operations_struct {
- int (*handle_mm_fault)(struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long addr,
- int write_access);
- int (*change_protection)(struct vm_area_struct *vma, unsigned long start,
- unsigned long end, unsigned long newflags);
- int (*copy_page_range)(struct mm_struct *dst_mm,
- struct mm_struct *src_mm, struct vm_area_struct *vma);
- int (*follow_page)(struct mm_struct *mm, struct vm_area_struct *vma,
- struct page **pages, struct vm_area_struct **vmas,
- unsigned long *position, int *length,
- int i, int write);
- int (*probe_mapped)(struct vm_area_struct *vma, unsigned long start,
- unsigned long *end_range, unsigned long *range_vm_flags);
- unsigned long (*unmap_page_range)(struct mmu_gather **tlbp,
- struct vm_area_struct *vma, unsigned long addr,
- unsigned long end, long *zap_work,
- struct zap_details *details);
- void (*free_pgd_range)(struct mmu_gather *tlb, unsigned long addr,
- unsigned long end, unsigned long floor,
- unsigned long ceiling);
- int (*init_module_vma)(struct vm_area_struct *vma,
- struct vm_area_struct *old_vma);
- void (*exit_module_vma)(struct vm_area_struct *vma);
- int (*init_module_mm)(struct mm_struct *mm,
- struct mm_module_struct *mm_mod);
- int (*exit_module_mm)(struct mm_struct *mm,
- struct mm_module_struct *mm_mod);
-};
-
----------------------------------------------------------------
-Physical Memory Module Interface Points:
-
-Page release interception:
- int (*put_page)(struct page *page);
-
- Called by put_page() to allow a pmem_module to receive a released page
- under it's management. Returns 1 if page was "taken" (determined to
- belong to the pmem_module), or 0 if not.
-
- int (*release_page)(struct page *page, struct zone **zonep,
- unsigned long flags);
-
- Called by release_pages() to allow a pmem_module to receive a released
- page under it's management. Returns 1 if page was "taken" (determined to
- belong to the pmem_module), or 0 if not. If page was taken, the spinlock
- &(*zonep)->lru_lock must also be released as per similar behavior in
- release_pages().
-
-Memory hotplug support:
- int (*sparse_mem_map_populate)(unsigned long pnum, int nid);
-
- Called by kmalloc_section_memmap() to allow the pmem_module to
- initialize page mapping state associated with newly discovered
- physical memory. Must return 0 if not successful.
-
-struct pmem_module_operations_struct {
- int (*put_page)(struct page *page);
- int (*release_page)(struct page *page, struct zone **zonep,
- unsigned long flags);
- int (*sparse_mem_map_populate)(unsigned long pnum, int nid);
-};
-
diff -Nau8r ./linux-mri/Module.symvers ./linux-3.10.5/Module.symvers
--- ./linux-mri/Module.symvers 2013-08-18 19:42:58.426252007 -0700
+++ ./linux-3.10.5/Module.symvers 2013-08-04 20:33:59.320067648 -0700
@@ -336,17 +336,16 @@
0x00000000 atomic_notifier_chain_register vmlinux EXPORT_SYMBOL_GPL
0x00000000 param_get_long vmlinux EXPORT_SYMBOL
0x00000000 nfs_atomic_open fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 drm_mm_takedown drivers/gpu/drm/drm EXPORT_SYMBOL
0x00000000 inet_twsk_schedule vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_ap_acpi_handle vmlinux EXPORT_SYMBOL
0x00000000 pci_msi_off vmlinux EXPORT_SYMBOL_GPL
0x00000000 posix_acl_alloc vmlinux EXPORT_SYMBOL
-0x00000000 pmd_clear_bad vmlinux EXPORT_SYMBOL_GPL
0x00000000 svc_set_num_threads net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
0x00000000 nfs_permission fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 cfg80211_get_p2p_attr vmlinux EXPORT_SYMBOL
0x00000000 skb_copy_datagram_iovec vmlinux EXPORT_SYMBOL
0x00000000 __kfree_skb vmlinux EXPORT_SYMBOL
0x00000000 snd_seq_autoload_unlock vmlinux EXPORT_SYMBOL
0x00000000 tty_port_register_device vmlinux EXPORT_SYMBOL_GPL
0x00000000 pci_find_parent_resource vmlinux EXPORT_SYMBOL
@@ -369,17 +368,16 @@
0x00000000 free_percpu vmlinux EXPORT_SYMBOL_GPL
0x00000000 tboot vmlinux EXPORT_SYMBOL
0x00000000 drm_helper_move_panel_connectors_to_head drivers/gpu/drm/drm_kms_helper EXPORT_SYMBOL
0x00000000 ip6_datagram_recv_ctl vmlinux EXPORT_SYMBOL_GPL
0x00000000 sk_setup_caps vmlinux EXPORT_SYMBOL_GPL
0x00000000 scsi_host_get vmlinux EXPORT_SYMBOL
0x00000000 zlib_inflateIncomp vmlinux EXPORT_SYMBOL
0x00000000 ida_pre_get vmlinux EXPORT_SYMBOL
-0x00000000 ptep_clear_flush vmlinux EXPORT_SYMBOL_GPL
0x00000000 __raw_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
0x00000000 sigprocmask vmlinux EXPORT_SYMBOL
0x00000000 drm_vblank_init drivers/gpu/drm/drm EXPORT_SYMBOL
0x00000000 sk_stream_wait_connect vmlinux EXPORT_SYMBOL
0x00000000 ec_burst_disable vmlinux EXPORT_SYMBOL
0x00000000 gf128mul_lle vmlinux EXPORT_SYMBOL
0x00000000 i2c_master_recv drivers/i2c/i2c-core EXPORT_SYMBOL
0x00000000 drm_global_mutex drivers/gpu/drm/drm EXPORT_SYMBOL
@@ -703,17 +701,16 @@
0x00000000 irq_get_irq_data vmlinux EXPORT_SYMBOL_GPL
0x00000000 drm_pci_free drivers/gpu/drm/drm EXPORT_SYMBOL
0x00000000 netdev_has_upper_dev vmlinux EXPORT_SYMBOL
0x00000000 acpi_bus_hot_remove_device vmlinux EXPORT_SYMBOL
0x00000000 wrmsr_safe_regs vmlinux EXPORT_SYMBOL
0x00000000 crc_itu_t vmlinux EXPORT_SYMBOL
0x00000000 flex_array_get_ptr vmlinux EXPORT_SYMBOL
0x00000000 bio_alloc_bioset vmlinux EXPORT_SYMBOL
-0x00000000 pmem_modules vmlinux EXPORT_SYMBOL_GPL
0x00000000 camellia_dec_blk_2way vmlinux EXPORT_SYMBOL_GPL
0x00000000 ieee80211_get_hdrlen_from_skb vmlinux EXPORT_SYMBOL
0x00000000 usb_driver_set_configuration vmlinux EXPORT_SYMBOL_GPL
0x00000000 class_compat_create_link vmlinux EXPORT_SYMBOL_GPL
0x00000000 vfs_cancel_lock vmlinux EXPORT_SYMBOL_GPL
0x00000000 pm_qos_remove_request vmlinux EXPORT_SYMBOL_GPL
0x00000000 acpi_processor_power_init_bm_check vmlinux EXPORT_SYMBOL
0x00000000 snd_hda_check_board_codec_sid_config sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
@@ -853,17 +850,16 @@
0x00000000 param_set_bool vmlinux EXPORT_SYMBOL
0x00000000 param_ops_bint vmlinux EXPORT_SYMBOL
0x00000000 xprt_free net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
0x00000000 nfs_alloc_inode fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 drm_global_item_unref drivers/gpu/drm/drm EXPORT_SYMBOL
0x00000000 ahci_thread_fn vmlinux EXPORT_SYMBOL_GPL
0x00000000 vga_switcheroo_register_handler vmlinux EXPORT_SYMBOL
0x00000000 would_dump vmlinux EXPORT_SYMBOL
-0x00000000 get_mm_counter vmlinux EXPORT_SYMBOL_GPL
0x00000000 truncate_inode_pages_range vmlinux EXPORT_SYMBOL
0x00000000 force_sig vmlinux EXPORT_SYMBOL
0x00000000 nfs4_fs_type fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 v4l2_ctrl_get_name drivers/media/v4l2-core/videodev EXPORT_SYMBOL
0x00000000 pci_set_dma_max_seg_size vmlinux EXPORT_SYMBOL
0x00000000 percpu_counter_batch vmlinux EXPORT_SYMBOL
0x00000000 d_path vmlinux EXPORT_SYMBOL
0x00000000 kvm_get_kvm vmlinux EXPORT_SYMBOL_GPL
@@ -2408,18 +2404,16 @@
0x00000000 nfsd_debug net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
0x00000000 ip_tunnel_newlink vmlinux EXPORT_SYMBOL_GPL
0x00000000 genl_notify vmlinux EXPORT_SYMBOL
0x00000000 devm_rtc_device_register vmlinux EXPORT_SYMBOL_GPL
0x00000000 devres_destroy vmlinux EXPORT_SYMBOL_GPL
0x00000000 tty_hangup vmlinux EXPORT_SYMBOL
0x00000000 acpi_read vmlinux EXPORT_SYMBOL
0x00000000 pci_disable_device vmlinux EXPORT_SYMBOL
-0x00000000 vm_normal_page vmlinux EXPORT_SYMBOL_GPL
-0x00000000 init_mm vmlinux EXPORT_SYMBOL_GPL
0x00000000 add_page_wait_queue vmlinux EXPORT_SYMBOL_GPL
0x00000000 devm_rtc_device_unregister vmlinux EXPORT_SYMBOL_GPL
0x00000000 pm_runtime_forbid vmlinux EXPORT_SYMBOL_GPL
0x00000000 tty_termios_copy_hw vmlinux EXPORT_SYMBOL
0x00000000 acpi_dev_get_resources vmlinux EXPORT_SYMBOL_GPL
0x00000000 __twofish_setkey vmlinux EXPORT_SYMBOL_GPL
0x00000000 cryptd_free_aead vmlinux EXPORT_SYMBOL_GPL
0x00000000 fscache_obtained_object vmlinux EXPORT_SYMBOL
@@ -2952,17 +2946,16 @@
0x00000000 is_bad_inode vmlinux EXPORT_SYMBOL
0x00000000 param_get_int vmlinux EXPORT_SYMBOL
0x00000000 snd_hda_codec_write sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 fb_get_color_depth drivers/video/fb EXPORT_SYMBOL
0x00000000 start_tty vmlinux EXPORT_SYMBOL
0x00000000 acpi_dev_resource_ext_address_space vmlinux EXPORT_SYMBOL_GPL
0x00000000 shash_ahash_finup vmlinux EXPORT_SYMBOL_GPL
0x00000000 user_update vmlinux EXPORT_SYMBOL_GPL
-0x00000000 split_vma vmlinux EXPORT_SYMBOL_GPL
0x00000000 __netdev_pick_tx vmlinux EXPORT_SYMBOL
0x00000000 skb_free_datagram_locked vmlinux EXPORT_SYMBOL
0x00000000 kernel_sock_shutdown vmlinux EXPORT_SYMBOL
0x00000000 snd_pcm_add_chmap_ctls vmlinux EXPORT_SYMBOL_GPL
0x00000000 snd_pcm_notify vmlinux EXPORT_SYMBOL
0x00000000 virtqueue_add_sgs vmlinux EXPORT_SYMBOL_GPL
0x00000000 pnp_unregister_card_driver vmlinux EXPORT_SYMBOL
0x00000000 prandom_u32 vmlinux EXPORT_SYMBOL
@@ -3233,17 +3226,16 @@
0x00000000 kernel_cpustat vmlinux EXPORT_SYMBOL
0x00000000 cfg80211_roamed vmlinux EXPORT_SYMBOL
0x00000000 ip_mc_inc_group vmlinux EXPORT_SYMBOL
0x00000000 tcp_orphan_count vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_sff_data_xfer vmlinux EXPORT_SYMBOL_GPL
0x00000000 request_key_with_auxdata vmlinux EXPORT_SYMBOL
0x00000000 fat_attach vmlinux EXPORT_SYMBOL_GPL
0x00000000 sysfs_remove_bin_file vmlinux EXPORT_SYMBOL_GPL
-0x00000000 tlb_gather_mmu vmlinux EXPORT_SYMBOL_GPL
0x00000000 register_wide_hw_breakpoint vmlinux EXPORT_SYMBOL_GPL
0x00000000 hid_dump_device vmlinux EXPORT_SYMBOL_GPL
0x00000000 wakeup_source_unregister vmlinux EXPORT_SYMBOL_GPL
0x00000000 snprintf vmlinux EXPORT_SYMBOL
0x00000000 get_io_context vmlinux EXPORT_SYMBOL
0x00000000 __tracepoint_block_rq_remap vmlinux EXPORT_SYMBOL_GPL
0x00000000 proc_mkdir_mode vmlinux EXPORT_SYMBOL
0x00000000 tag_pages_for_writeback vmlinux EXPORT_SYMBOL
@@ -3419,17 +3411,16 @@
0x00000000 ip6_update_pmtu vmlinux EXPORT_SYMBOL_GPL
0x00000000 noop_qdisc vmlinux EXPORT_SYMBOL
0x00000000 sock_alloc_send_skb vmlinux EXPORT_SYMBOL
0x00000000 snd_card_disconnect vmlinux EXPORT_SYMBOL
0x00000000 fw_send_response vmlinux EXPORT_SYMBOL
0x00000000 acpi_bus_get_device vmlinux EXPORT_SYMBOL
0x00000000 strnlen vmlinux EXPORT_SYMBOL
0x00000000 unregister_filesystem vmlinux EXPORT_SYMBOL
-0x00000000 free_pages_and_swap_cache vmlinux EXPORT_SYMBOL_GPL
0x00000000 vm_brk vmlinux EXPORT_SYMBOL
0x00000000 irq_domain_add_simple vmlinux EXPORT_SYMBOL_GPL
0x00000000 adjust_resource vmlinux EXPORT_SYMBOL
0x00000000 xfrm_state_insert vmlinux EXPORT_SYMBOL
0x00000000 kmsg_dump_register vmlinux EXPORT_SYMBOL_GPL
0x00000000 camellia_crypt_ctr vmlinux EXPORT_SYMBOL_GPL
0x00000000 snd_hda_shutup_pins sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 xprt_setup_backchannel net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
@@ -3603,18 +3594,16 @@
0x00000000 pcie_port_service_unregister vmlinux EXPORT_SYMBOL
0x00000000 radix_tree_delete vmlinux EXPORT_SYMBOL
0x00000000 amd_pmu_disable_virt vmlinux EXPORT_SYMBOL_GPL
0x00000000 tcp_slow_start vmlinux EXPORT_SYMBOL_GPL
0x00000000 dev_activate vmlinux EXPORT_SYMBOL
0x00000000 __pneigh_lookup vmlinux EXPORT_SYMBOL_GPL
0x00000000 devm_ioremap vmlinux EXPORT_SYMBOL
0x00000000 devm_iounmap vmlinux EXPORT_SYMBOL
-0x00000000 __pud_alloc vmlinux EXPORT_SYMBOL_GPL
-0x00000000 __pmd_alloc vmlinux EXPORT_SYMBOL_GPL
0x00000000 on_each_cpu vmlinux EXPORT_SYMBOL
0x00000000 dma_set_mask vmlinux EXPORT_SYMBOL
0x00000000 kvm_put_kvm vmlinux EXPORT_SYMBOL_GPL
0x00000000 snd_hda_codec_set_power_to_all sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 drm_gem_object_lookup drivers/gpu/drm/drm EXPORT_SYMBOL
0x00000000 agp3_generic_sizes drivers/char/agp/agpgart EXPORT_SYMBOL
0x00000000 udpv6_encap_enable vmlinux EXPORT_SYMBOL
0x00000000 snd_pcm_set_sync vmlinux EXPORT_SYMBOL
@@ -3873,17 +3862,16 @@
0x00000000 print_context_stack vmlinux EXPORT_SYMBOL_GPL
0x00000000 nfs_force_lookup_revalidate fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 nfs_lookup fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 drm_fb_helper_restore_fbdev_mode drivers/gpu/drm/drm_kms_helper EXPORT_SYMBOL
0x00000000 sk_run_filter vmlinux EXPORT_SYMBOL
0x00000000 netdev_rx_csum_fault vmlinux EXPORT_SYMBOL
0x00000000 ata_sff_data_xfer32 vmlinux EXPORT_SYMBOL_GPL
0x00000000 devres_release_group vmlinux EXPORT_SYMBOL_GPL
-0x00000000 max_pfn vmlinux EXPORT_SYMBOL_GPL
0x00000000 set_freezable vmlinux EXPORT_SYMBOL
0x00000000 xdr_decode_array2 net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
0x00000000 nfs_fhget fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 fb_destroy_modelist drivers/video/fb EXPORT_SYMBOL_GPL
0x00000000 bt_sock_reclassify_lock vmlinux EXPORT_SYMBOL
0x00000000 ipv6_push_nfrag_opts vmlinux EXPORT_SYMBOL
0x00000000 neigh_sysctl_unregister vmlinux EXPORT_SYMBOL
0x00000000 snd_pcm_format_width vmlinux EXPORT_SYMBOL
@@ -4488,17 +4476,16 @@
0x00000000 snd_hda_multi_out_dig_cleanup sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 __i2c_transfer drivers/i2c/i2c-core EXPORT_SYMBOL
0x00000000 thermal_zone_device_unregister vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_host_alloc_pinfo vmlinux EXPORT_SYMBOL_GPL
0x00000000 vfs_lock_file vmlinux EXPORT_SYMBOL_GPL
0x00000000 bio_uncopy_user vmlinux EXPORT_SYMBOL
0x00000000 make_bad_inode vmlinux EXPORT_SYMBOL
0x00000000 __d_drop vmlinux EXPORT_SYMBOL
-0x00000000 lru_add_drain vmlinux EXPORT_SYMBOL_GPL
0x00000000 __mmdrop vmlinux EXPORT_SYMBOL_GPL
0x00000000 gss_mech_unregister net/sunrpc/auth_gss/auth_rpcgss EXPORT_SYMBOL_GPL
0x00000000 tcp_memory_allocated vmlinux EXPORT_SYMBOL
0x00000000 hid_check_keys_pressed vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_sff_qc_fill_rtf vmlinux EXPORT_SYMBOL_GPL
0x00000000 scsi_bus_type vmlinux EXPORT_SYMBOL_GPL
0x00000000 strtobool vmlinux EXPORT_SYMBOL
0x00000000 jbd2_journal_force_commit_nested vmlinux EXPORT_SYMBOL
@@ -5044,17 +5031,16 @@
0x00000000 snd_hda_mixer_bind_tlv sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 rpc_alloc_iostats net/sunrpc/sunrpc EXPORT_SYMBOL_GPL
0x00000000 i2c_add_numbered_adapter drivers/i2c/i2c-core EXPORT_SYMBOL_GPL
0x00000000 snd_pcm_lib_get_vmalloc_page vmlinux EXPORT_SYMBOL
0x00000000 input_allocate_polled_device vmlinux EXPORT_SYMBOL
0x00000000 usb_unanchor_urb vmlinux EXPORT_SYMBOL_GPL
0x00000000 pcie_aspm_enabled vmlinux EXPORT_SYMBOL
0x00000000 poll_schedule_timeout vmlinux EXPORT_SYMBOL
-0x00000000 anon_vma_prepare vmlinux EXPORT_SYMBOL_GPL
0x00000000 lg_local_lock_cpu vmlinux EXPORT_SYMBOL
0x00000000 tcp_prot vmlinux EXPORT_SYMBOL
0x00000000 root_device_unregister vmlinux EXPORT_SYMBOL_GPL
0x00000000 vring_transport_features vmlinux EXPORT_SYMBOL_GPL
0x00000000 fuse_direct_io vmlinux EXPORT_SYMBOL_GPL
0x00000000 proc_dointvec_ms_jiffies vmlinux EXPORT_SYMBOL
0x00000000 v4l2_fh_release drivers/media/v4l2-core/videodev EXPORT_SYMBOL_GPL
0x00000000 inet_frag_kill vmlinux EXPORT_SYMBOL
@@ -5826,29 +5812,26 @@
0x00000000 stop_tty vmlinux EXPORT_SYMBOL
0x00000000 fscache_fsdef_index vmlinux EXPORT_SYMBOL
0x00000000 dquot_get_dqblk vmlinux EXPORT_SYMBOL
0x00000000 generic_write_sync vmlinux EXPORT_SYMBOL
0x00000000 nfs_pageio_reset_write_mds fs/nfs/nfs EXPORT_SYMBOL_GPL
0x00000000 sdio_writel vmlinux EXPORT_SYMBOL_GPL
0x00000000 acpi_get_type vmlinux EXPORT_SYMBOL
0x00000000 process_srcu vmlinux EXPORT_SYMBOL_GPL
-0x00000000 flush_tlb_mm_range vmlinux EXPORT_SYMBOL_GPL
0x00000000 xfrm_policy_destroy vmlinux EXPORT_SYMBOL
0x00000000 inet_del_offload vmlinux EXPORT_SYMBOL
0x00000000 sdio_memcpy_toio vmlinux EXPORT_SYMBOL_GPL
0x00000000 jbd2_journal_stop vmlinux EXPORT_SYMBOL
0x00000000 __trace_note_message vmlinux EXPORT_SYMBOL_GPL
0x00000000 neigh_ifdown vmlinux EXPORT_SYMBOL
0x00000000 snd_pcm_hw_constraint_ratnums vmlinux EXPORT_SYMBOL
0x00000000 snd_ctl_replace vmlinux EXPORT_SYMBOL
0x00000000 strcspn vmlinux EXPORT_SYMBOL
0x00000000 twofish_setkey vmlinux EXPORT_SYMBOL_GPL
-0x00000000 ___pud_free_tlb vmlinux EXPORT_SYMBOL_GPL
-0x00000000 ___pmd_free_tlb vmlinux EXPORT_SYMBOL_GPL
0x00000000 native_load_gs_index vmlinux EXPORT_SYMBOL
0x00000000 thermal_zone_unbind_cooling_device vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_cable_ignore vmlinux EXPORT_SYMBOL_GPL
0x00000000 pci_scan_bridge vmlinux EXPORT_SYMBOL
0x00000000 jbd2_journal_extend vmlinux EXPORT_SYMBOL
0x00000000 hid_parse_report vmlinux EXPORT_SYMBOL_GPL
0x00000000 ehci_resume vmlinux EXPORT_SYMBOL_GPL
0x00000000 blkdev_aio_write vmlinux EXPORT_SYMBOL_GPL
@@ -6271,17 +6254,16 @@
0x00000000 elevator_exit vmlinux EXPORT_SYMBOL
0x00000000 __lock_buffer vmlinux EXPORT_SYMBOL
0x00000000 blowfish_dec_blk vmlinux EXPORT_SYMBOL_GPL
0x00000000 acpi_clear_event vmlinux EXPORT_SYMBOL
0x00000000 debug_locks vmlinux EXPORT_SYMBOL_GPL
0x00000000 ablkcipher_walk_done vmlinux EXPORT_SYMBOL_GPL
0x00000000 ablkcipher_walk_phys vmlinux EXPORT_SYMBOL_GPL
0x00000000 aead_geniv_alloc vmlinux EXPORT_SYMBOL_GPL
-0x00000000 pud_clear_bad vmlinux EXPORT_SYMBOL_GPL
0x00000000 kvm_valid_efer vmlinux EXPORT_SYMBOL_GPL
0x00000000 agp_off drivers/char/agp/agpgart EXPORT_SYMBOL
0x00000000 irq_set_chip_data vmlinux EXPORT_SYMBOL
0x00000000 kvm_has_tsc_control vmlinux EXPORT_SYMBOL_GPL
0x00000000 registered_fb drivers/video/fb EXPORT_SYMBOL
0x00000000 cfg80211_scan_done vmlinux EXPORT_SYMBOL
0x00000000 inet6_csk_xmit vmlinux EXPORT_SYMBOL_GPL
0x00000000 tcp_ioctl vmlinux EXPORT_SYMBOL
@@ -7549,17 +7531,16 @@
0x00000000 wbinvd_on_all_cpus vmlinux EXPORT_SYMBOL
0x00000000 kobject_get_path vmlinux EXPORT_SYMBOL_GPL
0x00000000 clocksource_register vmlinux EXPORT_SYMBOL
0x00000000 bt_sock_link vmlinux EXPORT_SYMBOL
0x00000000 pcibios_scan_specific_bus vmlinux EXPORT_SYMBOL_GPL
0x00000000 ata_sas_async_probe vmlinux EXPORT_SYMBOL_GPL
0x00000000 copy_from_user_overflow vmlinux EXPORT_SYMBOL
0x00000000 full_name_hash vmlinux EXPORT_SYMBOL
-0x00000000 tlb_finish_mmu vmlinux EXPORT_SYMBOL_GPL
0x00000000 snd_hda_gen_add_kctl sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 framebuffer_release drivers/video/fb EXPORT_SYMBOL
0x00000000 ping_prot vmlinux EXPORT_SYMBOL
0x00000000 pm_generic_freeze vmlinux EXPORT_SYMBOL_GPL
0x00000000 device_create_vargs vmlinux EXPORT_SYMBOL_GPL
0x00000000 tty_port_hangup vmlinux EXPORT_SYMBOL
0x00000000 pnp_disable_dev vmlinux EXPORT_SYMBOL
0x00000000 crypto_inc vmlinux EXPORT_SYMBOL_GPL
@@ -7703,17 +7684,16 @@
0x00000000 fb_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
0x00000000 kstrtoint vmlinux EXPORT_SYMBOL
0x00000000 log_start_commit vmlinux EXPORT_SYMBOL
0x00000000 call_srcu vmlinux EXPORT_SYMBOL_GPL
0x00000000 v4l2_device_put drivers/media/v4l2-core/videodev EXPORT_SYMBOL_GPL
0x00000000 cpufreq_get_policy vmlinux EXPORT_SYMBOL
0x00000000 vga_switcheroo_client_fb_set vmlinux EXPORT_SYMBOL
0x00000000 dquot_set_dqblk vmlinux EXPORT_SYMBOL
-0x00000000 pgd_clear_bad vmlinux EXPORT_SYMBOL_GPL
0x00000000 __tracepoint_rpm_return_int vmlinux EXPORT_SYMBOL_GPL
0x00000000 __round_jiffies_relative vmlinux EXPORT_SYMBOL_GPL
0x00000000 check_tsc_unstable vmlinux EXPORT_SYMBOL_GPL
0x00000000 snd_hda_get_conn_list sound/pci/hda/snd-hda-codec EXPORT_SYMBOL_GPL
0x00000000 svc_pool_stats_open net/sunrpc/sunrpc EXPORT_SYMBOL
0x00000000 iwl_phy_db_init drivers/net/wireless/iwlwifi/iwlwifi EXPORT_SYMBOL_GPL
0x00000000 inet_frag_maybe_warn_overflow vmlinux EXPORT_SYMBOL
0x00000000 inet_twsk_alloc vmlinux EXPORT_SYMBOL_GPL
diff -Nau8r ./linux-mri/arch/x86/mm/fault.c ./linux-3.10.5/arch/x86/mm/fault.c
--- ./linux-mri/arch/x86/mm/fault.c 2013-08-18 16:29:45.114706663 -0700
+++ ./linux-3.10.5/arch/x86/mm/fault.c 2013-08-04 01:51:49.000000000 -0700
@@ -1183,25 +1183,16 @@
/*
* If for any reason at all we couldn't handle the fault,
* make sure we exit gracefully rather than endlessly redo
* the fault:
*/
fault = handle_mm_fault(mm, vma, address, flags);
if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
-#ifdef CONFIG_MM_MODULES
- if (fault & (VM_FAULT_SIGSEGV)) {
- if (fault & VM_FAULT_SEGV_ACCERR)
- bad_area_access_error(regs, error_code, address);
- else
- bad_area(regs, error_code, address);
- return;
- }
-#endif
if (mm_fault_error(regs, error_code, address, fault))
return;
}
/*
* Major/minor page fault accounting is only done on the
* initial attempt. If we go through a retry, it is extremely
* likely that the page will be found in page cache at that point.
diff -Nau8r ./linux-mri/arch/x86/mm/gup.c ./linux-3.10.5/arch/x86/mm/gup.c
--- ./linux-mri/arch/x86/mm/gup.c 2013-08-18 15:47:36.162944996 -0700
+++ ./linux-3.10.5/arch/x86/mm/gup.c 2013-08-04 01:51:49.000000000 -0700
@@ -58,30 +58,16 @@
smp_rmb();
if (unlikely(pte.pte_low != ptep->pte_low))
goto retry;
return pte;
#endif
}
-#ifdef CONFIG_MM_MODULES
-static inline int get_page_not_zero(struct page *page)
-{
- page = compound_head(page);
- return atomic_inc_not_zero(&page->_count);
-}
-
-static inline int get_head_page_multiple_not_zero(struct page *page, int nr)
-{
- VM_BUG_ON(page != compound_head(page));
- return atomic_add_unless(&page->_count, nr, 0);
-}
-#endif /* CONFIG_MM_MODULES */
-
/*
* The performance critical leaf functions are made noinline otherwise gcc
* inlines everything into a single function which results in too much
* register pressure.
*/
static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
unsigned long end, int write, struct page **pages, int *nr)
{
@@ -98,23 +84,17 @@
struct page *page;
if ((pte_flags(pte) & (mask | _PAGE_SPECIAL)) != mask) {
pte_unmap(ptep);
return 0;
}
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
-#ifdef CONFIG_MM_MODULES
- /* indicate failure if page ref count was already 0 */
- if (!get_page_not_zero(page))
- return 0;
-#else /* !CONFIG_MM_MODULES */
- get_page(page);
-#endif /* CONFIG_MM_MODULES */
+ get_page(page);
SetPageReferenced(page);
pages[*nr] = page;
(*nr)++;
} while (ptep++, addr += PAGE_SIZE, addr != end);
pte_unmap(ptep - 1);
return 1;
@@ -222,28 +202,19 @@
VM_BUG_ON(compound_head(page) != head);
pages[*nr] = page;
if (PageTail(page))
get_huge_page_tail(page);
(*nr)++;
page++;
refs++;
} while (addr += PAGE_SIZE, addr != end);
-#ifdef CONFIG_MM_MODULES
- if (!get_head_page_multiple_not_zero(head, refs)) {
- /* revert nr pages, indicate failure (ref count was 0) */
- (*nr) -= refs;
- return 0;
- }
- return 1;
-#else /* !CONFIG_MM_MODULES */
get_head_page_multiple(head, refs);
return 1;
-#endif /* CONFIG_MM_MODULES */
}
static int gup_pud_range(pgd_t pgd, unsigned long addr, unsigned long end,
int write, struct page **pages, int *nr)
{
unsigned long next;
pud_t *pudp;
diff -Nau8r ./linux-mri/arch/x86/mm/tlb.c ./linux-3.10.5/arch/x86/mm/tlb.c
--- ./linux-mri/arch/x86/mm/tlb.c 2013-08-18 19:40:21.834614310 -0700
+++ ./linux-3.10.5/arch/x86/mm/tlb.c 2013-08-04 01:51:49.000000000 -0700
@@ -229,19 +229,16 @@
return;
}
flush_all:
if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(mm_cpumask(mm), mm, 0UL, TLB_FLUSH_ALL);
preempt_enable();
}
-#ifdef CONFIG_PMEM_MODULES
-EXPORT_SYMBOL_GPL(flush_tlb_mm_range);
-#endif
void flush_tlb_page(struct vm_area_struct *vma, unsigned long start)
{
struct mm_struct *mm = vma->vm_mm;
preempt_disable();
if (current->active_mm == mm) {
diff -Nau8r ./linux-mri/drivers/misc/sgi-gru/grufault.c ./linux-3.10.5/drivers/misc/sgi-gru/grufault.c
--- ./linux-mri/drivers/misc/sgi-gru/grufault.c 2013-08-18 15:48:09.342753358 -0700
+++ ./linux-3.10.5/drivers/misc/sgi-gru/grufault.c 2013-08-04 01:51:49.000000000 -0700
@@ -188,20 +188,16 @@
* 1 - (atomic only) try again in non-atomic context
*/
static int non_atomic_pte_lookup(struct vm_area_struct *vma,
unsigned long vaddr, int write,
unsigned long *paddr, int *pageshift)
{
struct page *page;
-#ifdef CONFIG_MM_MODULES
- if (vma->mm_module_ops)
- return -EFAULT;
-#endif /* CONFIG_MM_MODULES */
#ifdef CONFIG_HUGETLB_PAGE
*pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT;
#else
*pageshift = PAGE_SHIFT;
#endif
if (get_user_pages
(current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0)
return -EFAULT;
@@ -251,19 +247,16 @@
return 1;
*paddr = pte_pfn(pte) << PAGE_SHIFT;
#ifdef CONFIG_HUGETLB_PAGE
*pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT;
#else
*pageshift = PAGE_SHIFT;
#endif
-#ifdef CONFIG_MM_MODULES
- *pageshift = (pmd_large(*pmdp)) ? HPAGE_SHIFT : PAGE_SHIFT;
-#endif /* CONFIG_MM_MODULES */
return 0;
err:
return 1;
}
static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr,
int write, int atomic, unsigned long *gpa, int *pageshift)
diff -Nau8r ./linux-mri/drivers/misc/sgi-gru/grufault.c.orig ./linux-3.10.5/drivers/misc/sgi-gru/grufault.c.orig
--- ./linux-mri/drivers/misc/sgi-gru/grufault.c.orig 2013-08-18 13:51:08.293262666 -0700
+++ ./linux-3.10.5/drivers/misc/sgi-gru/grufault.c.orig 1969-12-31 16:00:00.000000000 -0800
@@ -1,902 +0,0 @@
-/*
- * SN Platform GRU Driver
- *
- * FAULT HANDLER FOR GRU DETECTED TLB MISSES
- *
- * This file contains code that handles TLB misses within the GRU.
- * These misses are reported either via interrupts or user polling of
- * the user CB.
- *
- * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
- *
- * 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
- */
-
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/spinlock.h>
-#include <linux/mm.h>
-#include <linux/hugetlb.h>
-#include <linux/device.h>
-#include <linux/io.h>
-#include <linux/uaccess.h>
-#include <linux/security.h>
-#include <linux/prefetch.h>
-#include <asm/pgtable.h>
-#include "gru.h"
-#include "grutables.h"
-#include "grulib.h"
-#include "gru_instructions.h"
-#include <asm/uv/uv_hub.h>
-
-/* Return codes for vtop functions */
-#define VTOP_SUCCESS 0
-#define VTOP_INVALID -1
-#define VTOP_RETRY -2
-
-
-/*
- * Test if a physical address is a valid GRU GSEG address
- */
-static inline int is_gru_paddr(unsigned long paddr)
-{
- return paddr >= gru_start_paddr && paddr < gru_end_paddr;
-}
-
-/*
- * Find the vma of a GRU segment. Caller must hold mmap_sem.
- */
-struct vm_area_struct *gru_find_vma(unsigned long vaddr)
-{
- struct vm_area_struct *vma;
-
- vma = find_vma(current->mm, vaddr);
- if (vma && vma->vm_start <= vaddr && vma->vm_ops == &gru_vm_ops)
- return vma;
- return NULL;
-}
-
-/*
- * Find and lock the gts that contains the specified user vaddr.
- *
- * Returns:
- * - *gts with the mmap_sem locked for read and the GTS locked.
- * - NULL if vaddr invalid OR is not a valid GSEG vaddr.
- */
-
-static struct gru_thread_state *gru_find_lock_gts(unsigned long vaddr)
-{
- struct mm_struct *mm = current->mm;
- struct vm_area_struct *vma;
- struct gru_thread_state *gts = NULL;
-
- down_read(&mm->mmap_sem);
- vma = gru_find_vma(vaddr);
- if (vma)
- gts = gru_find_thread_state(vma, TSID(vaddr, vma));
- if (gts)
- mutex_lock(>s->ts_ctxlock);
- else
- up_read(&mm->mmap_sem);
- return gts;
-}
-
-static struct gru_thread_state *gru_alloc_locked_gts(unsigned long vaddr)
-{
- struct mm_struct *mm = current->mm;
- struct vm_area_struct *vma;
- struct gru_thread_state *gts = ERR_PTR(-EINVAL);
-
- down_write(&mm->mmap_sem);
- vma = gru_find_vma(vaddr);
- if (!vma)
- goto err;
-
- gts = gru_alloc_thread_state(vma, TSID(vaddr, vma));
- if (IS_ERR(gts))
- goto err;
- mutex_lock(>s->ts_ctxlock);
- downgrade_write(&mm->mmap_sem);
- return gts;
-
-err:
- up_write(&mm->mmap_sem);
- return gts;
-}
-
-/*
- * Unlock a GTS that was previously locked with gru_find_lock_gts().
- */
-static void gru_unlock_gts(struct gru_thread_state *gts)
-{
- mutex_unlock(>s->ts_ctxlock);
- up_read(¤t->mm->mmap_sem);
-}
-
-/*
- * Set a CB.istatus to active using a user virtual address. This must be done
- * just prior to a TFH RESTART. The new cb.istatus is an in-cache status ONLY.
- * If the line is evicted, the status may be lost. The in-cache update
- * is necessary to prevent the user from seeing a stale cb.istatus that will
- * change as soon as the TFH restart is complete. Races may cause an
- * occasional failure to clear the cb.istatus, but that is ok.
- */
-static void gru_cb_set_istatus_active(struct gru_instruction_bits *cbk)
-{
- if (cbk) {
- cbk->istatus = CBS_ACTIVE;
- }
-}
-
-/*
- * Read & clear a TFM
- *
- * The GRU has an array of fault maps. A map is private to a cpu
- * Only one cpu will be accessing a cpu's fault map.
- *
- * This function scans the cpu-private fault map & clears all bits that
- * are set. The function returns a bitmap that indicates the bits that
- * were cleared. Note that sense the maps may be updated asynchronously by
- * the GRU, atomic operations must be used to clear bits.
- */
-static void get_clear_fault_map(struct gru_state *gru,
- struct gru_tlb_fault_map *imap,
- struct gru_tlb_fault_map *dmap)
-{
- unsigned long i, k;
- struct gru_tlb_fault_map *tfm;
-
- tfm = get_tfm_for_cpu(gru, gru_cpu_fault_map_id());
- prefetchw(tfm); /* Helps on hardware, required for emulator */
- for (i = 0; i < BITS_TO_LONGS(GRU_NUM_CBE); i++) {
- k = tfm->fault_bits[i];
- if (k)
- k = xchg(&tfm->fault_bits[i], 0UL);
- imap->fault_bits[i] = k;
- k = tfm->done_bits[i];
- if (k)
- k = xchg(&tfm->done_bits[i], 0UL);
- dmap->fault_bits[i] = k;