* [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros
@ 2018-08-31 9:10 Andy Shevchenko
2018-08-31 9:10 ` [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro Andy Shevchenko
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Andy Shevchenko @ 2018-08-31 9:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
Cc: Andy Shevchenko
These macros are often used by drivers and we have already a lot of
duplication as ICPU() macro across the drivers.
Provide a generic x86 macro for users.
This adds no driver data variants.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/include/asm/intel-family.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index 7ed08a7c3398..093014aceb65 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -83,10 +83,16 @@
.family = _family, \
.model = _model, \
.feature = X86_FEATURE_ANY, \
- .driver_data = (kernel_ulong_t)&_driver_data \
+ .driver_data = (kernel_ulong_t)_driver_data \
}
#define INTEL_CPU_FAM6(_model, _driver_data) \
- INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, _driver_data)
+ INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, &_driver_data)
+
+#define INTEL_CPU_FAM_ANY_NODATA(_family, _model) \
+ INTEL_CPU_FAM_ANY(_family, _model, NULL)
+
+#define INTEL_CPU_FAM6_NODATA(_model) \
+ INTEL_CPU_FAM_ANY_NODATA(6, INTEL_FAM6_##_model)
#endif /* _ASM_X86_INTEL_FAMILY_H */
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro
2018-08-31 9:10 [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andy Shevchenko
@ 2018-08-31 9:10 ` Andy Shevchenko
2018-09-04 15:34 ` kbuild test robot
2018-08-31 9:10 ` [PATCH v1 3/4] ACPI / LPSS: " Andy Shevchenko
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2018-08-31 9:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
Cc: Andy Shevchenko
Replace custom grown macro with generic INTEL_CPU_FAM_ANY() one.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/include/asm/intel-family.h | 2 ++
arch/x86/platform/efi/quirks.c | 6 +-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index 093014aceb65..be28519b2020 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -16,6 +16,8 @@
* that group keep the CPUID for the variants sorted by model number.
*/
+#define INTEL_FAM5_QUARK_X1000 0x09
+
#define INTEL_FAM6_CORE_YONAH 0x0E
#define INTEL_FAM6_CORE2_MEROM 0x0F
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 844d31cb8a0c..cf8ea09cc52b 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -610,12 +610,8 @@ static int qrk_capsule_setup_info(struct capsule_info *cap_info, void **pkbuff,
return 1;
}
-#define ICPU(family, model, quirk_handler) \
- { X86_VENDOR_INTEL, family, model, X86_FEATURE_ANY, \
- (unsigned long)&quirk_handler }
-
static const struct x86_cpu_id efi_capsule_quirk_ids[] = {
- ICPU(5, 9, qrk_capsule_setup_info), /* Intel Quark X1000 */
+ INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
{ }
};
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v1 3/4] ACPI / LPSS: Get rid of custom ICPU() macro
2018-08-31 9:10 [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andy Shevchenko
2018-08-31 9:10 ` [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro Andy Shevchenko
@ 2018-08-31 9:10 ` Andy Shevchenko
2018-09-11 11:02 ` Rafael J. Wysocki
2018-08-31 9:10 ` [PATCH v1 4/4] ACPI / x86: utils: " Andy Shevchenko
2018-08-31 15:41 ` [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andi Kleen
3 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2018-08-31 9:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
Cc: Andy Shevchenko
Replace custom grown macro with generic INTEL_CPU_FAM6_NODATA() one.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/acpi_lpss.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 9706613eecf9..c363e2a40f13 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -289,11 +289,9 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {
.setup = lpss_deassert_reset,
};
-#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
-
static const struct x86_cpu_id lpss_cpu_ids[] = {
- ICPU(INTEL_FAM6_ATOM_SILVERMONT1), /* Valleyview, Bay Trail */
- ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry Trail */
+ INTEL_CPU_FAM6_NODATA(ATOM_SILVERMONT1), /* Valleyview, Bay Trail */
+ INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), /* Braswell, Cherry Trail */
{}
};
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v1 4/4] ACPI / x86: utils: Get rid of custom ICPU() macro
2018-08-31 9:10 [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andy Shevchenko
2018-08-31 9:10 ` [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro Andy Shevchenko
2018-08-31 9:10 ` [PATCH v1 3/4] ACPI / LPSS: " Andy Shevchenko
@ 2018-08-31 9:10 ` Andy Shevchenko
2018-09-11 11:03 ` Rafael J. Wysocki
2018-08-31 15:41 ` [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andi Kleen
3 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2018-08-31 9:10 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
Cc: Andy Shevchenko
Replace custom grown macro with generic INTEL_CPU_FAM6_NODATA() one.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/x86/utils.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 06c31ec3cc70..6bb2a4565386 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -40,8 +40,6 @@ struct always_present_id {
const char *uid;
};
-#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
-
#define ENTRY(hid, uid, cpu_models, dmi...) { \
{ { hid, }, {} }, \
{ cpu_models, {} }, \
@@ -54,24 +52,24 @@ static const struct always_present_id always_present_ids[] = {
* Bay / Cherry Trail PWM directly poked by GPU driver in win10,
* but Linux uses a separate PWM driver, harmless if not used.
*/
- ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT1), {}),
- ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
+ ENTRY("80860F09", "1", INTEL_CPU_FAM6_NODATA(ATOM_SILVERMONT1), {}),
+ ENTRY("80862288", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {}),
/*
* The INT0002 device is necessary to clear wakeup interrupt sources
* on Cherry Trail devices, without it we get nobody cared IRQ msgs.
*/
- ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
+ ENTRY("INT0002", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {}),
/*
* On the Dell Venue 11 Pro 7130 and 7139, the DSDT hides
* the touchscreen ACPI device until a certain time
* after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed
* *and* _STA has been called at least 3 times since.
*/
- ENTRY("SYNA7500", "1", ICPU(INTEL_FAM6_HASWELL_ULT), {
+ ENTRY("SYNA7500", "1", INTEL_CPU_FAM6_NODATA(HASWELL_ULT), {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
}),
- ENTRY("SYNA7500", "1", ICPU(INTEL_FAM6_HASWELL_ULT), {
+ ENTRY("SYNA7500", "1", INTEL_CPU_FAM6_NODATA(HASWELL_ULT), {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
}),
@@ -87,19 +85,19 @@ static const struct always_present_id always_present_ids[] = {
* was copy-pasted from the GPD win, so it has a disabled KIOX000A
* node which we should not enable, thus we also check the BIOS date.
*/
- ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
+ ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
DMI_MATCH(DMI_BOARD_NAME, "Default string"),
DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
DMI_MATCH(DMI_BIOS_DATE, "02/21/2017")
}),
- ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
+ ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
DMI_MATCH(DMI_BOARD_NAME, "Default string"),
DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
DMI_MATCH(DMI_BIOS_DATE, "03/20/2017")
}),
- ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
+ ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
DMI_MATCH(DMI_BOARD_NAME, "Default string"),
DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros
2018-08-31 9:10 [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andy Shevchenko
` (2 preceding siblings ...)
2018-08-31 9:10 ` [PATCH v1 4/4] ACPI / x86: utils: " Andy Shevchenko
@ 2018-08-31 15:41 ` Andi Kleen
2018-08-31 15:51 ` Andy Shevchenko
3 siblings, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2018-08-31 15:41 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> +
> +#define INTEL_CPU_FAM_ANY_NODATA(_family, _model) \
> + INTEL_CPU_FAM_ANY(_family, _model, NULL)
> +
> +#define INTEL_CPU_FAM6_NODATA(_model) \
> + INTEL_CPU_FAM_ANY_NODATA(6, INTEL_FAM6_##_model)
_NODATA is actually longer than passing NULL ?
Seems unnecessary
-Andi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros
2018-08-31 15:41 ` [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andi Kleen
@ 2018-08-31 15:51 ` Andy Shevchenko
0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2018-08-31 15:51 UTC (permalink / raw)
To: Andi Kleen
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel
On Fri, Aug 31, 2018 at 08:41:28AM -0700, Andi Kleen wrote:
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> > +
> > +#define INTEL_CPU_FAM_ANY_NODATA(_family, _model) \
> > + INTEL_CPU_FAM_ANY(_family, _model, NULL)
> > +
> > +#define INTEL_CPU_FAM6_NODATA(_model) \
> > + INTEL_CPU_FAM_ANY_NODATA(6, INTEL_FAM6_##_model)
> _NODATA is actually longer than passing NULL ?
One character longer (you have to compare to ", NULL").
> Seems unnecessary
Let's gather other's opinions.
P.S. In any case some refactoring is needed to allow NULL in parameters (move &
out from base macro).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro
2018-08-31 9:10 ` [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro Andy Shevchenko
@ 2018-09-04 15:34 ` kbuild test robot
0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2018-09-04 15:34 UTC (permalink / raw)
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/auto-latest]
[also build test ERROR on v4.19-rc2 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/x86-cpu-Introduce-INTEL_CPU_FAM-_NODATA-helper-macros/20180903-170803
config: i386-randconfig-x078-201835 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
:::::: branch date: 56 minutes ago
:::::: commit date: 56 minutes ago
All errors (new ones prefixed by >>):
>> arch/x86/platform/efi/quirks.c:614:2: error: implicit declaration of function 'INTEL_CPU_FAM_ANY' [-Werror=implicit-function-declaration]
INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
^~~~~~~~~~~~~~~~~
>> arch/x86/platform/efi/quirks.c:614:23: error: 'INTEL_FAM5_QUARK_X1000' undeclared here (not in a function)
INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/e4c07e90e85507005bc79839ce9c0dbc8f016578
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e4c07e90e85507005bc79839ce9c0dbc8f016578
vim +/INTEL_CPU_FAM_ANY +614 arch/x86/platform/efi/quirks.c
2959c95d Jan Kiszka 2017-06-02 612
2959c95d Jan Kiszka 2017-06-02 613 static const struct x86_cpu_id efi_capsule_quirk_ids[] = {
e4c07e90 Andy Shevchenko 2018-08-31 @614 INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
2959c95d Jan Kiszka 2017-06-02 615 { }
2959c95d Jan Kiszka 2017-06-02 616 };
2959c95d Jan Kiszka 2017-06-02 617
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29097 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro
@ 2018-09-04 15:34 ` kbuild test robot
0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2018-09-04 15:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Rafael J. Wysocki, Len Brown, linux-acpi,
linux-efi, linux-kernel, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/auto-latest]
[also build test ERROR on v4.19-rc2 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/x86-cpu-Introduce-INTEL_CPU_FAM-_NODATA-helper-macros/20180903-170803
config: i386-randconfig-x078-201835 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
:::::: branch date: 56 minutes ago
:::::: commit date: 56 minutes ago
All errors (new ones prefixed by >>):
>> arch/x86/platform/efi/quirks.c:614:2: error: implicit declaration of function 'INTEL_CPU_FAM_ANY' [-Werror=implicit-function-declaration]
INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
^~~~~~~~~~~~~~~~~
>> arch/x86/platform/efi/quirks.c:614:23: error: 'INTEL_FAM5_QUARK_X1000' undeclared here (not in a function)
INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/e4c07e90e85507005bc79839ce9c0dbc8f016578
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e4c07e90e85507005bc79839ce9c0dbc8f016578
vim +/INTEL_CPU_FAM_ANY +614 arch/x86/platform/efi/quirks.c
2959c95d Jan Kiszka 2017-06-02 612
2959c95d Jan Kiszka 2017-06-02 613 static const struct x86_cpu_id efi_capsule_quirk_ids[] = {
e4c07e90 Andy Shevchenko 2018-08-31 @614 INTEL_CPU_FAM_ANY(5, INTEL_FAM5_QUARK_X1000, &qrk_capsule_setup_info),
2959c95d Jan Kiszka 2017-06-02 615 { }
2959c95d Jan Kiszka 2017-06-02 616 };
2959c95d Jan Kiszka 2017-06-02 617
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29097 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 3/4] ACPI / LPSS: Get rid of custom ICPU() macro
2018-08-31 9:10 ` [PATCH v1 3/4] ACPI / LPSS: " Andy Shevchenko
@ 2018-09-11 11:02 ` Rafael J. Wysocki
0 siblings, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2018-09-11 11:02 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Len Brown, linux-acpi, linux-efi, linux-kernel
On Friday, August 31, 2018 11:10:17 AM CEST Andy Shevchenko wrote:
> Replace custom grown macro with generic INTEL_CPU_FAM6_NODATA() one.
>
> No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/acpi/acpi_lpss.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 9706613eecf9..c363e2a40f13 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -289,11 +289,9 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {
> .setup = lpss_deassert_reset,
> };
>
> -#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
> -
> static const struct x86_cpu_id lpss_cpu_ids[] = {
> - ICPU(INTEL_FAM6_ATOM_SILVERMONT1), /* Valleyview, Bay Trail */
> - ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry Trail */
> + INTEL_CPU_FAM6_NODATA(ATOM_SILVERMONT1), /* Valleyview, Bay Trail */
> + INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), /* Braswell, Cherry Trail */
> {}
> };
>
>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 4/4] ACPI / x86: utils: Get rid of custom ICPU() macro
2018-08-31 9:10 ` [PATCH v1 4/4] ACPI / x86: utils: " Andy Shevchenko
@ 2018-09-11 11:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2018-09-11 11:03 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Ard Biesheuvel, Len Brown, linux-acpi, linux-efi, linux-kernel
On Friday, August 31, 2018 11:10:18 AM CEST Andy Shevchenko wrote:
> Replace custom grown macro with generic INTEL_CPU_FAM6_NODATA() one.
>
> No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/acpi/x86/utils.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> index 06c31ec3cc70..6bb2a4565386 100644
> --- a/drivers/acpi/x86/utils.c
> +++ b/drivers/acpi/x86/utils.c
> @@ -40,8 +40,6 @@ struct always_present_id {
> const char *uid;
> };
>
> -#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
> -
> #define ENTRY(hid, uid, cpu_models, dmi...) { \
> { { hid, }, {} }, \
> { cpu_models, {} }, \
> @@ -54,24 +52,24 @@ static const struct always_present_id always_present_ids[] = {
> * Bay / Cherry Trail PWM directly poked by GPU driver in win10,
> * but Linux uses a separate PWM driver, harmless if not used.
> */
> - ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT1), {}),
> - ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
> + ENTRY("80860F09", "1", INTEL_CPU_FAM6_NODATA(ATOM_SILVERMONT1), {}),
> + ENTRY("80862288", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {}),
> /*
> * The INT0002 device is necessary to clear wakeup interrupt sources
> * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
> */
> - ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
> + ENTRY("INT0002", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {}),
> /*
> * On the Dell Venue 11 Pro 7130 and 7139, the DSDT hides
> * the touchscreen ACPI device until a certain time
> * after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed
> * *and* _STA has been called at least 3 times since.
> */
> - ENTRY("SYNA7500", "1", ICPU(INTEL_FAM6_HASWELL_ULT), {
> + ENTRY("SYNA7500", "1", INTEL_CPU_FAM6_NODATA(HASWELL_ULT), {
> DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
> }),
> - ENTRY("SYNA7500", "1", ICPU(INTEL_FAM6_HASWELL_ULT), {
> + ENTRY("SYNA7500", "1", INTEL_CPU_FAM6_NODATA(HASWELL_ULT), {
> DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
> }),
> @@ -87,19 +85,19 @@ static const struct always_present_id always_present_ids[] = {
> * was copy-pasted from the GPD win, so it has a disabled KIOX000A
> * node which we should not enable, thus we also check the BIOS date.
> */
> - ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
> + ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
> DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> DMI_MATCH(DMI_BOARD_NAME, "Default string"),
> DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
> DMI_MATCH(DMI_BIOS_DATE, "02/21/2017")
> }),
> - ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
> + ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
> DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> DMI_MATCH(DMI_BOARD_NAME, "Default string"),
> DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
> DMI_MATCH(DMI_BIOS_DATE, "03/20/2017")
> }),
> - ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
> + ENTRY("KIOX000A", "1", INTEL_CPU_FAM6_NODATA(ATOM_AIRMONT), {
> DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
> DMI_MATCH(DMI_BOARD_NAME, "Default string"),
> DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-09-11 11:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 9:10 [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andy Shevchenko
2018-08-31 9:10 ` [PATCH v1 2/4] x86/efi: Get rid of custom ICPU() macro Andy Shevchenko
2018-09-04 15:34 ` kbuild test robot
2018-09-04 15:34 ` kbuild test robot
2018-08-31 9:10 ` [PATCH v1 3/4] ACPI / LPSS: " Andy Shevchenko
2018-09-11 11:02 ` Rafael J. Wysocki
2018-08-31 9:10 ` [PATCH v1 4/4] ACPI / x86: utils: " Andy Shevchenko
2018-09-11 11:03 ` Rafael J. Wysocki
2018-08-31 15:41 ` [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Andi Kleen
2018-08-31 15:51 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.