Commit c753d66
arm64: mm: Simplify __flush_tlb_range_limit_excess()
__flush_tlb_range_limit_excess() is unnecessarily complicated:
- It takes a 'start', 'end' and 'pages' argument, whereas it only
needs 'pages' (which the caller has computed from the other two
arguments!).
- It erroneously compares 'pages' with MAX_TLBI_RANGE_PAGES when
the system doesn't support range-based invalidation but the range to
be invalidated would result in fewer than MAX_DVM_OPS invalidations.
Simplify the function so that it no longer takes the 'start' and 'end'
arguments and only considers the MAX_TLBI_RANGE_PAGES threshold on
systems that implement range-based invalidation.
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>1 parent 057bbd8 commit c753d66
1 file changed
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
| 540 | + | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
548 | 548 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 549 | + | |
| 550 | + | |
553 | 551 | | |
554 | | - | |
| 552 | + | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
| |||
565 | 563 | | |
566 | 564 | | |
567 | 565 | | |
568 | | - | |
| 566 | + | |
569 | 567 | | |
570 | 568 | | |
571 | 569 | | |
| |||
629 | 627 | | |
630 | 628 | | |
631 | 629 | | |
632 | | - | |
| 630 | + | |
633 | 631 | | |
634 | 632 | | |
635 | 633 | | |
| |||
0 commit comments