History

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon: "There's no real pattern to the fixes, but the main one fixes our pmd_leaf() definition to resolve a NULL dereference on the migration path. - Fix PMU event validation in the absence of any event counters - Fix allmodconfig build using clang in conjunction with binutils - Fix definitions of pXd_leaf() to handle PROT_NONE entries - More typo fixes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: fix p?d_leaf() arm64: fix typos in comments arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang arm_pmu: Validate single/group leader events

Linus Torvalds committed 4 years ago

Commit 72000952 parents 22f19f6 23bc8f63 files · +18 −11Browse files

Unified · Split

3 files
  1. arch/arm64/Kconfig +12 −3
  2. arch/arm64/include/asm/pgtable.h +2 −2
  3. drivers/perf/arm_pmu.c +4 −6
arch/arm64/Kconfig+12−3
@@ -175,8 +175,6 @@ config ARM64 · 174 unmodified lines
175 select HAVE_DEBUG_KMEMLEAK175 select HAVE_DEBUG_KMEMLEAK
176 select HAVE_DMA_CONTIGUOUS176 select HAVE_DMA_CONTIGUOUS
177 select HAVE_DYNAMIC_FTRACE177 select HAVE_DYNAMIC_FTRACE
178 select HAVE_DYNAMIC_FTRACE_WITH_REGS \
179 if $(cc-option,-fpatchable-function-entry=2)
180 select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \178 select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
181 if DYNAMIC_FTRACE_WITH_REGS179 if DYNAMIC_FTRACE_WITH_REGS
182 select HAVE_EFFICIENT_UNALIGNED_ACCESS180 select HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -228,6 +226,17 @@ config ARM64 · 45 unmodified lines
228 help226 help
229 ARM 64-bit (AArch64) Linux support.227 ARM 64-bit (AArch64) Linux support.
230 228
229config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
230 def_bool CC_IS_CLANG
231 # https://github.com/ClangBuiltLinux/linux/issues/1507
232 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
233 select HAVE_DYNAMIC_FTRACE_WITH_REGS
234
235config GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
236 def_bool CC_IS_GCC
237 depends on $(cc-option,-fpatchable-function-entry=2)
238 select HAVE_DYNAMIC_FTRACE_WITH_REGS
239
231config 64BIT240config 64BIT
232 def_bool y241 def_bool y
233 242
@@ -678,7 +687,7 @@ config ARM64_ERRATUM_2051678 · 444 unmodified lines
678 default y687 default y
679 help688 help
680 This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678.689 This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678.
681 Affected Coretex-A510 might not respect the ordering rules for690 Affected Cortex-A510 might not respect the ordering rules for
682 hardware update of the page table's dirty bit. The workaround691 hardware update of the page table's dirty bit. The workaround
683 is to not enable the feature on affected CPUs.692 is to not enable the feature on affected CPUs.
684 693
arch/arm64/include/asm/pgtable.h+2−2
@@ -535,7 +535,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, · 534 unmodified lines
535 PMD_TYPE_TABLE)535 PMD_TYPE_TABLE)
536#define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \536#define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
537 PMD_TYPE_SECT)537 PMD_TYPE_SECT)
538#define pmd_leaf(pmd) pmd_sect(pmd)538#define pmd_leaf(pmd) (pmd_present(pmd) && !pmd_table(pmd))
539#define pmd_bad(pmd) (!pmd_table(pmd))539#define pmd_bad(pmd) (!pmd_table(pmd))
540 540
541#define pmd_leaf_size(pmd) (pmd_cont(pmd) ? CONT_PMD_SIZE : PMD_SIZE)541#define pmd_leaf_size(pmd) (pmd_cont(pmd) ? CONT_PMD_SIZE : PMD_SIZE)
@@ -625,7 +625,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) · 83 unmodified lines
625#define pud_none(pud) (!pud_val(pud))625#define pud_none(pud) (!pud_val(pud))
626#define pud_bad(pud) (!pud_table(pud))626#define pud_bad(pud) (!pud_table(pud))
627#define pud_present(pud) pte_present(pud_pte(pud))627#define pud_present(pud) pte_present(pud_pte(pud))
628#define pud_leaf(pud) pud_sect(pud)628#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
629#define pud_valid(pud) pte_valid(pud_pte(pud))629#define pud_valid(pud) pte_valid(pud_pte(pud))
630 630
631static inline void set_pud(pud_t *pudp, pud_t pud)631static inline void set_pud(pud_t *pudp, pud_t pud)
drivers/perf/arm_pmu.c+4−6
@@ -400,6 +400,9 @@ validate_group(struct perf_event *event) · 399 unmodified lines
400 if (!validate_event(event->pmu, &fake_pmu, leader))400 if (!validate_event(event->pmu, &fake_pmu, leader))
401 return -EINVAL;401 return -EINVAL;
402 402
403 if (event == leader)
404 return 0;
405
403 for_each_sibling_event(sibling, leader) {406 for_each_sibling_event(sibling, leader) {
404 if (!validate_event(event->pmu, &fake_pmu, sibling))407 if (!validate_event(event->pmu, &fake_pmu, sibling))
405 return -EINVAL;408 return -EINVAL;
@@ -489,12 +492,7 @@ __hw_perf_event_init(struct perf_event *event) · 83 unmodified lines
489 local64_set(&hwc->period_left, hwc->sample_period);492 local64_set(&hwc->period_left, hwc->sample_period);
490 }493 }
491 494
492 if (event->group_leader != event) {495 return validate_group(event);
493 if (validate_group(event) != 0)
494 return -EINVAL;
495 }
496
497 return 0;
498}496}
499 497
500static int armpmu_event_init(struct perf_event *event)498static int armpmu_event_init(struct perf_event *event)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t