Skip to content

Commit

Permalink
powerpc: Include asm/firmware.h in all users of firmware_has_feature()
Browse files Browse the repository at this point in the history
Trying to remove asm/ppc_asm.h from all places that don't need it
leads to several failures linked to firmware_has_feature().

To fix it, include asm/firmware.h in all files using
firmware_has_feature()

All users found with:

	git grep -L "firmware\.h" ` git grep -l "firmware_has_feature("`

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/11956ec181a034b51a881ac9c059eea72c679a73.1651828453.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Jun 29, 2022
1 parent ab8bca9 commit 46d60bd
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/book3s/64/hugetlb.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_BOOK3S_64_HUGETLB_H
#define _ASM_POWERPC_BOOK3S_64_HUGETLB_H

#include <asm/firmware.h>

/*
* For radix we want generic code to handle hugetlb. But then if we want
* both hash and radix to be enabled together we need to workaround the
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/cputime.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/div64.h>
#include <asm/time.h>
#include <asm/param.h>
#include <asm/firmware.h>

typedef u64 __nocast cputime_t;
typedef u64 __nocast cputime64_t;
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include <linux/context_tracking.h>
#include <linux/hardirq.h>
#include <asm/cputime.h>
#include <asm/firmware.h>
#include <asm/ftrace.h>
#include <asm/kprobes.h>
#include <asm/runlatch.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/mm.h>
#include <linux/pkeys.h>
#include <asm/cpu_has_feature.h>
#include <asm/firmware.h>

static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
unsigned long pkey)
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/types.h>
#include <asm/irq.h>
#include <linux/atomic.h>
#include <asm/firmware.h>

/* These includes should be removed once implicit includes are cleaned up. */
#include <linux/of.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/dawr.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/debugfs.h>
#include <asm/machdep.h>
#include <asm/hvcall.h>
#include <asm/firmware.h>

bool dawr_force_enable;
EXPORT_SYMBOL_GPL(dawr_force_enable);
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kexec/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/pgalloc.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/firmware.h>

void machine_kexec_mask_interrupts(void) {
unsigned int i;
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kvm/book3s_64_mmu_radix.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <asm/ultravisor.h>
#include <asm/kvm_book3s_uvmem.h>
#include <asm/plpar_wrappers.h>
#include <asm/firmware.h>

/*
* Supported radix tree geometry.
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kvm/book3s_hv_nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/pte-walk.h>
#include <asm/reg.h>
#include <asm/plpar_wrappers.h>
#include <asm/firmware.h>

static struct patb_entry *pseries_partition_tb;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/book3s64/hash_pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <asm/sections.h>
#include <asm/mmu.h>
#include <asm/tlb.h>
#include <asm/firmware.h>

#include <mm/mmu_decl.h>

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/book3s64/pkeys.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <asm/mmu.h>
#include <asm/setup.h>
#include <asm/smp.h>
#include <asm/firmware.h>

#include <linux/pkeys.h>
#include <linux/of_fdt.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <asm/setup.h>
#include <asm/hugetlb.h>
#include <asm/pte-walk.h>
#include <asm/firmware.h>

bool hugetlb_disabled = false;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/papr_platform_attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <asm/hvcall.h>
#include <asm/machdep.h>
#include <asm/firmware.h>

#include "pseries.h"

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/vas.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <asm/machdep.h>
#include <asm/hvcall.h>
#include <asm/plpar_wrappers.h>
#include <asm/firmware.h>
#include <asm/vas.h>
#include "vas.h"

Expand Down

0 comments on commit 46d60bd

Please sign in to comment.