All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-05-05 17:18 ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-05-05 17:18 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Darren Stevens, R.T.Dickinson, Christian Zigotzky, linuxppc-dev,
	linux-kernel

Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
range was not getting mapped as the logic to handle no "ranges" was
inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
when looking for a non-PCI ISA region.

Fixes: e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing")
Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Rob Herring <robh@kernel.org>
---
Untested, but I think this should fix the issue.

 arch/powerpc/kernel/isa-bridge.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index 85bdd7d3652f..48e0eaf1ad61 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
 	}
 
 inval_range:
-	if (!phb_io_base_phys) {
+	if (phb_io_base_phys) {
 		pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
 		remap_isa_base(phb_io_base_phys, 0x10000);
+		return 0;
 	}
-	return 0;
+	return -EINVAL;
 }
 
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-05-05 17:18 ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2023-05-05 17:18 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Darren Stevens, linuxppc-dev, linux-kernel, R.T.Dickinson,
	Christian Zigotzky

Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
range was not getting mapped as the logic to handle no "ranges" was
inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
when looking for a non-PCI ISA region.

Fixes: e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing")
Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Rob Herring <robh@kernel.org>
---
Untested, but I think this should fix the issue.

 arch/powerpc/kernel/isa-bridge.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index 85bdd7d3652f..48e0eaf1ad61 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
 	}
 
 inval_range:
-	if (!phb_io_base_phys) {
+	if (phb_io_base_phys) {
 		pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
 		remap_isa_base(phb_io_base_phys, 0x10000);
+		return 0;
 	}
-	return 0;
+	return -EINVAL;
 }
 
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
  2023-05-05 17:18 ` Rob Herring
@ 2023-05-07  9:24   ` Christian Zigotzky
  -1 siblings, 0 replies; 10+ messages in thread
From: Christian Zigotzky @ 2023-05-07  9:24 UTC (permalink / raw)
  To: Rob Herring, Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Darren Stevens, linuxppc-dev, linux-kernel, R.T.Dickinson,
	Christian Zigotzky

On 05 May 2023 at 07:18 pm, Rob Herring wrote:
> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
> range was not getting mapped as the logic to handle no "ranges" was
> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
> when looking for a non-PCI ISA region.
>
> Fixes: e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing")
> Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/
> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Untested, but I think this should fix the issue.
>
>   arch/powerpc/kernel/isa-bridge.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
> index 85bdd7d3652f..48e0eaf1ad61 100644
> --- a/arch/powerpc/kernel/isa-bridge.c
> +++ b/arch/powerpc/kernel/isa-bridge.c
> @@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
>   	}
>   
>   inval_range:
> -	if (!phb_io_base_phys) {
> +	if (phb_io_base_phys) {
>   		pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
>   		remap_isa_base(phb_io_base_phys, 0x10000);
> +		return 0;
>   	}
> -	return 0;
> +	return -EINVAL;
>   }
>   
>   
The Nemo board boots with this patch. Thanks a lot for your help!

Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-05-07  9:24   ` Christian Zigotzky
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Zigotzky @ 2023-05-07  9:24 UTC (permalink / raw)
  To: Rob Herring, Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Darren Stevens, R.T.Dickinson, linuxppc-dev, linux-kernel,
	Christian Zigotzky

On 05 May 2023 at 07:18 pm, Rob Herring wrote:
> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
> range was not getting mapped as the logic to handle no "ranges" was
> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
> when looking for a non-PCI ISA region.
>
> Fixes: e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing")
> Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/
> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Untested, but I think this should fix the issue.
>
>   arch/powerpc/kernel/isa-bridge.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
> index 85bdd7d3652f..48e0eaf1ad61 100644
> --- a/arch/powerpc/kernel/isa-bridge.c
> +++ b/arch/powerpc/kernel/isa-bridge.c
> @@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
>   	}
>   
>   inval_range:
> -	if (!phb_io_base_phys) {
> +	if (phb_io_base_phys) {
>   		pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
>   		remap_isa_base(phb_io_base_phys, 0x10000);
> +		return 0;
>   	}
> -	return 0;
> +	return -EINVAL;
>   }
>   
>   
The Nemo board boots with this patch. Thanks a lot for your help!

Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
  2023-05-05 17:18 ` Rob Herring
@ 2023-07-03  5:21   ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2023-07-03  5:21 UTC (permalink / raw)
  To: Nicholas Piggin, Christophe Leroy, Rob Herring
  Cc: Darren Stevens, R.T.Dickinson, Christian Zigotzky, linuxppc-dev,
	linux-kernel

On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
> range was not getting mapped as the logic to handle no "ranges" was
> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
> when looking for a non-PCI ISA region.
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
      https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65

cheers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-07-03  5:21   ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2023-07-03  5:21 UTC (permalink / raw)
  To: Nicholas Piggin, Christophe Leroy, Rob Herring
  Cc: Darren Stevens, linuxppc-dev, linux-kernel, R.T.Dickinson,
	Christian Zigotzky

On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
> range was not getting mapped as the logic to handle no "ranges" was
> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
> when looking for a non-PCI ISA region.
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
      https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65

cheers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
  2023-07-03  5:21   ` Michael Ellerman
@ 2023-07-03  6:23     ` Christian Zigotzky
  -1 siblings, 0 replies; 10+ messages in thread
From: Christian Zigotzky @ 2023-07-03  6:23 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy, Rob Herring
  Cc: Darren Stevens, R.T.Dickinson, linuxppc-dev, linux-kernel

On 03.07.23 07:21, Michael Ellerman wrote:
> On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
>> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
>> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
>> range was not getting mapped as the logic to handle no "ranges" was
>> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
>> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
>> when looking for a non-PCI ISA region.
>>
>> [...]
> Applied to powerpc/fixes.
>
> [1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
>        https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65
>
> cheers
Hello Michael,

This patch has already been applied. Link: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624

Thanks,
Christian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-07-03  6:23     ` Christian Zigotzky
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Zigotzky @ 2023-07-03  6:23 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy, Rob Herring
  Cc: Darren Stevens, linuxppc-dev, linux-kernel, R.T.Dickinson

On 03.07.23 07:21, Michael Ellerman wrote:
> On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
>> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
>> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
>> range was not getting mapped as the logic to handle no "ranges" was
>> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
>> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
>> when looking for a non-PCI ISA region.
>>
>> [...]
> Applied to powerpc/fixes.
>
> [1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
>        https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65
>
> cheers
Hello Michael,

This patch has already been applied. Link: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624

Thanks,
Christian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
  2023-07-03  6:23     ` Christian Zigotzky
@ 2023-07-03 11:32       ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2023-07-03 11:32 UTC (permalink / raw)
  To: Christian Zigotzky, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Rob Herring
  Cc: Darren Stevens, R.T.Dickinson, linuxppc-dev, linux-kernel

Christian Zigotzky <chzigotzky@xenosoft.de> writes:
> On 03.07.23 07:21, Michael Ellerman wrote:
>> On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
>>> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
>>> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
>>> range was not getting mapped as the logic to handle no "ranges" was
>>> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
>>> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
>>> when looking for a non-PCI ISA region.
>>>
>>> [...]
>> Applied to powerpc/fixes.
>>
>> [1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
>>        https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65
>>
>> cheers
> Hello Michael,
>
> This patch has already been applied. Link: 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624

Yes, it's actually the same commit. I'm just catching up on sending the
thanks emails. Sorry for the confusion.

cheers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
@ 2023-07-03 11:32       ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2023-07-03 11:32 UTC (permalink / raw)
  To: Christian Zigotzky, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Rob Herring
  Cc: Darren Stevens, linuxppc-dev, linux-kernel, R.T.Dickinson

Christian Zigotzky <chzigotzky@xenosoft.de> writes:
> On 03.07.23 07:21, Michael Ellerman wrote:
>> On Fri, 05 May 2023 12:18:17 -0500, Rob Herring wrote:
>>> Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges"
>>> parsing") broke PASemi Nemo board booting. The issue is the ISA I/O
>>> range was not getting mapped as the logic to handle no "ranges" was
>>> inverted. If phb_io_base_phys is non-zero, then the ISA range defaults
>>> to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0
>>> when looking for a non-PCI ISA region.
>>>
>>> [...]
>> Applied to powerpc/fixes.
>>
>> [1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
>>        https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65
>>
>> cheers
> Hello Michael,
>
> This patch has already been applied. Link: 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624

Yes, it's actually the same commit. I'm just catching up on sending the
thanks emails. Sorry for the confusion.

cheers

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-03 11:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05 17:18 [PATCH] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present Rob Herring
2023-05-05 17:18 ` Rob Herring
2023-05-07  9:24 ` Christian Zigotzky
2023-05-07  9:24   ` Christian Zigotzky
2023-07-03  5:21 ` Michael Ellerman
2023-07-03  5:21   ` Michael Ellerman
2023-07-03  6:23   ` Christian Zigotzky
2023-07-03  6:23     ` Christian Zigotzky
2023-07-03 11:32     ` Michael Ellerman
2023-07-03 11:32       ` Michael Ellerman

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.