Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2023 11:28:09 -0400
From:      Mitchell Horne <mhorne@freebsd.org>
To:        John Baldwin <jhb@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: f9bdaab95ec4 - main - ofwbus: remove handling of resources from ofwbus
Message-ID:  <69b2594c-6332-5169-50ec-de35fcce0fb6@freebsd.org>
In-Reply-To: <195e5cd0-e2cf-14d4-07d4-f368ab1a5f59@FreeBSD.org>
References:  <202302082052.318KqNUL052449@gitrepo.freebsd.org> <195e5cd0-e2cf-14d4-07d4-f368ab1a5f59@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/9/23 13:42, John Baldwin wrote:
> On 2/8/23 12:52 PM, Mitchell Horne wrote:
>> The branch main has been updated by mhorne:
>>
>> URL: 
>> https://cgit.FreeBSD.org/src/commit/?id=f9bdaab95ec469738fbfc1f0edd3e8c744b7f71f
>>
>> commit f9bdaab95ec469738fbfc1f0edd3e8c744b7f71f
>> Author:     Elliott Mitchell <ehem+freebsd@m5p.com>
>> AuthorDate: 2023-02-08 20:17:03 +0000
>> Commit:     Mitchell Horne <mhorne@FreeBSD.org>
>> CommitDate: 2023-02-08 20:50:46 +0000
>>
>>      ofwbus: remove handling of resources from ofwbus
>>      The architecture nexus should handle allocation and release of 
>> memory and
>>      interrupts. This is to ensure that system-wide resources such as 
>> these
>>      are available to all devices, not just children of ofwbus0.
>>      On powerpc this moves the ownership of these resources up one level,
>>      from ofwbus0 to nexus0. Other architectures already have the 
>> required
>>      logic in their nexus implementation, so this eliminates the 
>> duplication
>>      of resources. An implementation of nexus_adjust_resource() is 
>> added for
>>      arm, arm64, and riscv.
>>      As noted by ian@ in the review, resource handling was the main 
>> bit of
>>      logic distinguishing ofwbus from simplebus. With some attention to
>>      detail, it should be possible to merge the two in the future.
>>      Co-authored by: mhorne
>>      MFC after:      1 month
>>      Differential Revision: https://reviews.freebsd.org/D30554
> 
> Thanks!  I actually had an earlier version of this but hadn't managed to 
> get it
> tested on powerpc.  I had it as part of a branch to cleanup 
> bus_activate_resource
> methods across various architectures whcih I will now rebase and try to 
> finish
> up.
> 
> If you are curious: 
> https://github.com/freebsd/freebsd-src/compare/main...bsdjhb:freebsd:bus_map_resource_more
> 

Hey, very nice. I definitely saw a lot of cleanup potential and it seems 
like your branch does a lot in that respect.

I have a couple of follow-ups in the area, so I will get those up into 
phab shortly.

Mitchell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69b2594c-6332-5169-50ec-de35fcce0fb6>