* [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
@ 2023-11-24 9:09 Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Bjorn Helgaas, linux-kernel, linux-pci
Cc: Ilpo Järvinen
Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
arch/x86/kernel/aperture_64.c | 3 +--
arch/x86/kernel/early-quirks.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 4feaa670d578..89c0c8a3fc7e 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
order);
}
- /* No multi-function device? */
type = read_pci_config_byte(bus, slot, func,
PCI_HEADER_TYPE);
- if (!(type & 0x80))
+ if (!(type & PCI_HEADER_TYPE_MFD))
break;
}
}
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index a6c1867fc7aa..59f4aefc6bc1 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func)
type = read_pci_config_byte(num, slot, func,
PCI_HEADER_TYPE);
- if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
+ if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
if (sec > num)
early_pci_scan_bus(sec);
}
- if (!(type & 0x80))
+ if (!(type & PCI_HEADER_TYPE_MFD))
return -1;
return 0;
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
@ 2023-11-24 9:09 ` Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " Ilpo Järvinen
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev,
linux-kernel
Cc: Ilpo Järvinen
Replace 0x7f literals with PCI_HEADER_TYPE_MASK.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
arch/powerpc/sysdev/fsl_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 3868483fbe29..ef7707ea0db7 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -54,7 +54,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev)
/* if we aren't in host mode don't bother */
pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
- if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
+ if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
return;
dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL;
@@ -581,7 +581,7 @@ static int fsl_add_bridge(struct platform_device *pdev, int is_primary)
hose->ops = &fsl_indirect_pcie_ops;
/* For PCIE read HEADER_TYPE to identify controller mode */
early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type);
- if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
+ if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
goto no_bridge;
} else {
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
@ 2023-11-24 9:09 ` Ilpo Järvinen
2023-11-29 10:21 ` Max Filippov
2023-11-24 9:09 ` [PATCH 4/6] scsi: lpfc: " Ilpo Järvinen
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: Chris Zankel, Max Filippov, linux-kernel; +Cc: Ilpo Järvinen
Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert
found_multi into boolean.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
arch/xtensa/lib/pci-auto.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c
index aa6752237985..05fc02f9e1c7 100644
--- a/arch/xtensa/lib/pci-auto.c
+++ b/arch/xtensa/lib/pci-auto.c
@@ -11,6 +11,7 @@
* Based on work from Matt Porter <mporter@mvista.com>
*/
+#include <linux/bitfield.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
@@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus,
int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
{
- int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0;
+ int sub_bus, pci_devfn, pci_class, cmdstat;
unsigned short vid;
unsigned char header_type;
struct pci_dev *dev = &pciauto_dev;
+ bool found_multi = false;
pciauto_dev.bus = &pciauto_bus;
pciauto_dev.sysdata = pci_ctrl;
@@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
continue;
if (!PCI_FUNC(pci_devfn))
- found_multi = header_type & 0x80;
+ found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type);
pci_read_config_word(dev, PCI_VENDOR_ID, &vid);
if (vid == 0xffff || vid == 0x0000) {
- found_multi = 0;
+ found_multi = false;
continue;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/6] scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " Ilpo Järvinen
@ 2023-11-24 9:09 ` Ilpo Järvinen
2023-12-06 1:41 ` Martin K. Petersen
2023-11-24 9:09 ` [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Ilpo Järvinen
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: James Smart, Dick Kennedy, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
Cc: Ilpo Järvinen
Replace literal 0x80 with PCI_HEADER_TYPE_MFD.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/scsi/lpfc/lpfc_sli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 9386e7b44750..4ac6afd3c2fe 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4875,7 +4875,7 @@ void lpfc_reset_barrier(struct lpfc_hba *phba)
lockdep_assert_held(&phba->hbalock);
pci_read_config_byte(phba->pcidev, PCI_HEADER_TYPE, &hdrtype);
- if (hdrtype != 0x80 ||
+ if (hdrtype != PCI_HEADER_TYPE_MFD ||
(FC_JEDEC_ID(phba->vpd.rev.biuRev) != HELIOS_JEDEC_ID &&
FC_JEDEC_ID(phba->vpd.rev.biuRev) != THOR_JEDEC_ID))
return;
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
` (2 preceding siblings ...)
2023-11-24 9:09 ` [PATCH 4/6] scsi: lpfc: " Ilpo Järvinen
@ 2023-11-24 9:09 ` Ilpo Järvinen
2023-11-24 14:11 ` Borislav Petkov
2023-11-24 9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-12-01 20:44 ` [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Bjorn Helgaas
5 siblings, 1 reply; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: Borislav Petkov, Tony Luck, James Morse, Mauro Carvalho Chehab,
Robert Richter, linux-edac, linux-kernel
Cc: Ilpo Järvinen
Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/edac/edac_pci_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index 287cc51dbc86..901d4cd3ca38 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -521,7 +521,7 @@ static void edac_pci_dev_parity_clear(struct pci_dev *dev)
/* read the device TYPE, looking for bridges */
pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
- if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE)
+ if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE)
get_pci_parity_status(dev, 1);
}
@@ -583,7 +583,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_dbg(4, "PCI HEADER TYPE= 0x%02x %s\n",
header_type, dev_name(&dev->dev));
- if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
+ if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
/* On bridges, need to examine secondary status register */
status = get_pci_parity_status(dev, 1);
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
` (3 preceding siblings ...)
2023-11-24 9:09 ` [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Ilpo Järvinen
@ 2023-11-24 9:09 ` Ilpo Järvinen
2023-11-27 7:31 ` Kalle Valo
2023-11-30 19:21 ` Kalle Valo
2023-12-01 20:44 ` [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Bjorn Helgaas
5 siblings, 2 replies; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24 9:09 UTC (permalink / raw)
To: Rafał Miłecki, linux-wireless, linux-kernel; +Cc: Ilpo Järvinen
Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/bcma/driver_pci_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index aa0581cda718..ed3be52ab63d 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -280,7 +280,7 @@ static u8 bcma_find_pci_capability(struct bcma_drv_pci *pc, unsigned int dev,
/* check for Header type 0 */
bcma_extpci_read_config(pc, dev, func, PCI_HEADER_TYPE, &byte_val,
sizeof(u8));
- if ((byte_val & 0x7F) != PCI_HEADER_TYPE_NORMAL)
+ if ((byte_val & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_NORMAL)
return cap_ptr;
/* check if the capability pointer field exists */
--
2.30.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals
2023-11-24 9:09 ` [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Ilpo Järvinen
@ 2023-11-24 14:11 ` Borislav Petkov
0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2023-11-24 14:11 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Tony Luck, James Morse, Mauro Carvalho Chehab, Robert Richter,
linux-edac, linux-kernel
On Fri, Nov 24, 2023 at 11:09:17AM +0200, Ilpo Järvinen wrote:
> Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/edac/edac_pci_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal
2023-11-24 9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
@ 2023-11-27 7:31 ` Kalle Valo
2023-11-28 9:43 ` Ilpo Järvinen
2023-11-30 19:21 ` Kalle Valo
1 sibling, 1 reply; 16+ messages in thread
From: Kalle Valo @ 2023-11-27 7:31 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: Rafał Miłecki, linux-wireless, linux-kernel
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:
> Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
I couldn't find the cover letter. Should I take this patch to
wireless-next or do you have other plans for this?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal
2023-11-27 7:31 ` Kalle Valo
@ 2023-11-28 9:43 ` Ilpo Järvinen
0 siblings, 0 replies; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-28 9:43 UTC (permalink / raw)
To: Kalle Valo; +Cc: Rafał Miłecki, linux-wireless, LKML
[-- Attachment #1: Type: text/plain, Size: 434 bytes --]
On Mon, 27 Nov 2023, Kalle Valo wrote:
> Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:
>
> > Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
> >
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>
> I couldn't find the cover letter. Should I take this patch to
> wireless-next or do you have other plans for this?
Just take it through the normal trees, so in this case wireless-next.
Thank you.
--
i.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
2023-11-24 9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " Ilpo Järvinen
@ 2023-11-29 10:21 ` Max Filippov
0 siblings, 0 replies; 16+ messages in thread
From: Max Filippov @ 2023-11-29 10:21 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: Chris Zankel, linux-kernel
On Fri, Nov 24, 2023 at 1:09 AM Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com> wrote:
>
> Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert
> found_multi into boolean.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> arch/xtensa/lib/pci-auto.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Thanks. Applied to my xtensa tree.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal
2023-11-24 9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-27 7:31 ` Kalle Valo
@ 2023-11-30 19:21 ` Kalle Valo
1 sibling, 0 replies; 16+ messages in thread
From: Kalle Valo @ 2023-11-30 19:21 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Rafał Miłecki, linux-wireless, linux-kernel,
Ilpo Järvinen
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote:
> Replace literal 0x7f with PCI_HEADER_TYPE_MASK.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Patch applied to wireless-next.git, thanks.
ac586b8401c9 bcma: Use PCI_HEADER_TYPE_MASK instead of literal
--
https://patchwork.kernel.org/project/linux-wireless/patch/20231124090919.23687-6-ilpo.jarvinen@linux.intel.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
` (4 preceding siblings ...)
2023-11-24 9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
@ 2023-12-01 20:44 ` Bjorn Helgaas
2023-12-01 22:56 ` Bjorn Helgaas
5 siblings, 1 reply; 16+ messages in thread
From: Bjorn Helgaas @ 2023-12-01 20:44 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Bjorn Helgaas, linux-kernel, linux-pci
On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote:
> Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Applied entire series on the PCI "enumeration" branch for v6.8,
thanks!
If anybody wants to take pieces separately, let me know and I'll drop
from PCI.
> ---
> arch/x86/kernel/aperture_64.c | 3 +--
> arch/x86/kernel/early-quirks.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 4feaa670d578..89c0c8a3fc7e 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
> order);
> }
>
> - /* No multi-function device? */
> type = read_pci_config_byte(bus, slot, func,
> PCI_HEADER_TYPE);
> - if (!(type & 0x80))
> + if (!(type & PCI_HEADER_TYPE_MFD))
> break;
> }
> }
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index a6c1867fc7aa..59f4aefc6bc1 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func)
> type = read_pci_config_byte(num, slot, func,
> PCI_HEADER_TYPE);
>
> - if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
> + if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
> sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
> if (sec > num)
> early_pci_scan_bus(sec);
> }
>
> - if (!(type & 0x80))
> + if (!(type & PCI_HEADER_TYPE_MFD))
> return -1;
>
> return 0;
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
2023-12-01 20:44 ` [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Bjorn Helgaas
@ 2023-12-01 22:56 ` Bjorn Helgaas
2023-12-05 2:06 ` Michael Ellerman
2023-12-06 2:01 ` Martin K. Petersen
0 siblings, 2 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2023-12-01 22:56 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Bjorn Helgaas, linux-kernel, linux-pci,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev,
James Smart, Dick Kennedy, James E.J. Bottomley,
Martin K. Petersen, linux-scsi
[+cc scsi, powerpc folks]
On Fri, Dec 01, 2023 at 02:44:47PM -0600, Bjorn Helgaas wrote:
> On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote:
> > Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.
> >
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>
> Applied entire series on the PCI "enumeration" branch for v6.8,
> thanks!
>
> If anybody wants to take pieces separately, let me know and I'll drop
> from PCI.
OK, b4 picked up the entire series but I was only cc'd on this first
patch, so I missed the responses about EDAC, xtensa, bcma already
being applied elsewhere.
So I kept these in the PCI tree:
420ac76610d7 ("scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal")
3773343dd890 ("powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal")
197e0da1f1a3 ("x86/pci: Use PCI_HEADER_TYPE_* instead of literals")
and dropped the others.
x86, SCSI, powerpc folks, if you want to take these instead, let me
know and I'll drop them.
> > ---
> > arch/x86/kernel/aperture_64.c | 3 +--
> > arch/x86/kernel/early-quirks.c | 4 ++--
> > 2 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> > index 4feaa670d578..89c0c8a3fc7e 100644
> > --- a/arch/x86/kernel/aperture_64.c
> > +++ b/arch/x86/kernel/aperture_64.c
> > @@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
> > order);
> > }
> >
> > - /* No multi-function device? */
> > type = read_pci_config_byte(bus, slot, func,
> > PCI_HEADER_TYPE);
> > - if (!(type & 0x80))
> > + if (!(type & PCI_HEADER_TYPE_MFD))
> > break;
> > }
> > }
> > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> > index a6c1867fc7aa..59f4aefc6bc1 100644
> > --- a/arch/x86/kernel/early-quirks.c
> > +++ b/arch/x86/kernel/early-quirks.c
> > @@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func)
> > type = read_pci_config_byte(num, slot, func,
> > PCI_HEADER_TYPE);
> >
> > - if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
> > + if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
> > sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
> > if (sec > num)
> > early_pci_scan_bus(sec);
> > }
> >
> > - if (!(type & 0x80))
> > + if (!(type & PCI_HEADER_TYPE_MFD))
> > return -1;
> >
> > return 0;
> > --
> > 2.30.2
> >
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
2023-12-01 22:56 ` Bjorn Helgaas
@ 2023-12-05 2:06 ` Michael Ellerman
2023-12-06 2:01 ` Martin K. Petersen
1 sibling, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2023-12-05 2:06 UTC (permalink / raw)
To: Bjorn Helgaas, Ilpo Järvinen
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Bjorn Helgaas, linux-kernel, linux-pci,
Nicholas Piggin, Christophe Leroy, linuxppc-dev, James Smart,
Dick Kennedy, James E.J. Bottomley, Martin K. Petersen,
linux-scsi
Bjorn Helgaas <helgaas@kernel.org> writes:
> [+cc scsi, powerpc folks]
>
> On Fri, Dec 01, 2023 at 02:44:47PM -0600, Bjorn Helgaas wrote:
>> On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote:
>> > Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.
>> >
>> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>>
>> Applied entire series on the PCI "enumeration" branch for v6.8,
>> thanks!
>>
>> If anybody wants to take pieces separately, let me know and I'll drop
>> from PCI.
>
> OK, b4 picked up the entire series but I was only cc'd on this first
> patch, so I missed the responses about EDAC, xtensa, bcma already
> being applied elsewhere.
>
> So I kept these in the PCI tree:
>
> 420ac76610d7 ("scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal")
> 3773343dd890 ("powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal")
> 197e0da1f1a3 ("x86/pci: Use PCI_HEADER_TYPE_* instead of literals")
>
> and dropped the others.
>
> x86, SCSI, powerpc folks, if you want to take these instead, let me
> know and I'll drop them.
Nah that's fine, you keep them.
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/6] scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal
2023-11-24 9:09 ` [PATCH 4/6] scsi: lpfc: " Ilpo Järvinen
@ 2023-12-06 1:41 ` Martin K. Petersen
0 siblings, 0 replies; 16+ messages in thread
From: Martin K. Petersen @ 2023-12-06 1:41 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: James Smart, Dick Kennedy, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
Ilpo,
> Replace literal 0x80 with PCI_HEADER_TYPE_MFD.
Applied to 6.8/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
2023-12-01 22:56 ` Bjorn Helgaas
2023-12-05 2:06 ` Michael Ellerman
@ 2023-12-06 2:01 ` Martin K. Petersen
1 sibling, 0 replies; 16+ messages in thread
From: Martin K. Petersen @ 2023-12-06 2:01 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Ilpo Järvinen, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, Bjorn Helgaas, linux-kernel,
linux-pci, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
linuxppc-dev, James Smart, Dick Kennedy, James E.J. Bottomley,
Martin K. Petersen, linux-scsi
Bjorn,
> So I kept these in the PCI tree:
>
> 420ac76610d7 ("scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal")
I merged this without seeing your note but I haven't pushed yet so I'll
just drop the commit.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2023-12-06 2:02 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-24 9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " Ilpo Järvinen
2023-11-29 10:21 ` Max Filippov
2023-11-24 9:09 ` [PATCH 4/6] scsi: lpfc: " Ilpo Järvinen
2023-12-06 1:41 ` Martin K. Petersen
2023-11-24 9:09 ` [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Ilpo Järvinen
2023-11-24 14:11 ` Borislav Petkov
2023-11-24 9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-27 7:31 ` Kalle Valo
2023-11-28 9:43 ` Ilpo Järvinen
2023-11-30 19:21 ` Kalle Valo
2023-12-01 20:44 ` [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Bjorn Helgaas
2023-12-01 22:56 ` Bjorn Helgaas
2023-12-05 2:06 ` Michael Ellerman
2023-12-06 2:01 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox