First of all, we don't use intel-family.h directly. On the other hand we actively use boolean type, that is defined in the types.h (we take top-level header for that) and x86_cpu_id, that is provided in the mod_devicetable.h. Secondly, we don't need to spread SOC_INTEL_IS_CPU() macro to the users. Hence, undefine it when it's appropriate.
Showing the changes to include/linux/platform_data (1 of 1 file). Show all
Unified · Split
| @@ -8,10 +8,13 @@ · 7 unmodified lines | |||
| 8 | #ifndef __PLATFORM_DATA_X86_SOC_H | 8 | #ifndef __PLATFORM_DATA_X86_SOC_H |
| 9 | #define __PLATFORM_DATA_X86_SOC_H | 9 | #define __PLATFORM_DATA_X86_SOC_H |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 11 | #if IS_ENABLED(CONFIG_X86) | 13 | #if IS_ENABLED(CONFIG_X86) |
| 12 | 14 | ||
| 15 | #include <linux/mod_devicetable.h> | ||
| 16 | |||
| 13 | #include <asm/cpu_device_id.h> | 17 | #include <asm/cpu_device_id.h> |
| 14 | #include <asm/intel-family.h> | ||
| 15 | 18 | ||
| 16 | #define SOC_INTEL_IS_CPU(soc, type) \ | 19 | #define SOC_INTEL_IS_CPU(soc, type) \ |
| 17 | static inline bool soc_intel_is_##soc(void) \ | 20 | static inline bool soc_intel_is_##soc(void) \ |
| @@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); · 16 unmodified lines | |||
| 34 | SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS); | 37 | SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS); |
| 35 | SOC_INTEL_IS_CPU(cml, KABYLAKE_L); | 38 | SOC_INTEL_IS_CPU(cml, KABYLAKE_L); |
| 36 | 39 | ||
| 40 | #undef SOC_INTEL_IS_CPU | ||
| 41 | |||
| 37 | #else /* IS_ENABLED(CONFIG_X86) */ | 42 | #else /* IS_ENABLED(CONFIG_X86) */ |
| 38 | 43 | ||
| 39 | static inline bool soc_intel_is_byt(void) | 44 | static inline bool soc_intel_is_byt(void) |