Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2022 09:20:50 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 832acea92fc8 - main - icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient.
Message-ID:  <e0734dbf-745c-632b-c158-084b212baa16@FreeBSD.org>
In-Reply-To: <87FDC36E-0A15-4E43-A1C7-A2F61D60526F@fubar.geek.nz>
References:  <202203110221.22B2LmuN037273@gitrepo.freebsd.org> <87FDC36E-0A15-4E43-A1C7-A2F61D60526F@fubar.geek.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/11/22 1:32 AM, Andrew Turner wrote:
> 
> 
>> On 11 Mar 2022, at 02:21, John Baldwin <jhb@freebsd.org> wrote:
>>
>> The branch main has been updated by jhb:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=832acea92fc8cdb55859a6a4b1bc38bf766780f1
>>
>> commit 832acea92fc8cdb55859a6a4b1bc38bf766780f1
>> Author:     John Baldwin <jhb@FreeBSD.org>
>> AuthorDate: 2022-03-11 02:20:28 +0000
>> Commit:     John Baldwin <jhb@FreeBSD.org>
>> CommitDate: 2022-03-11 02:20:28 +0000
>>
>>     icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient.
> 
> The i386 and arm version of PHYS_TO_DMAP is:
> #define PHYS_TO_DMAP(x) ({ panic("No direct map exists"); 0; })
> 
> On these architectures there is no DMAP region.
> 
> On powerpc there may not be a DMAP region. It appears to depend on the CPU.
> 
> You can use PMAP_HAS_DMAP to check if the DMAP region is supported, however you’ll need a fallback to create a temporary mapping.

The earlier commit does use PMAP_HAS_DMAP to set ic->unmapped, so
these functions are not used as CAM won't schedule CCB's with
CAM_DATA_BIO.  (The detail about honoring PMAP_HAS_DMAP is in the
log of the previous commit to icl_soft.c.)  This is similar to how
GELI deals with supporting unmapped I/O requests (it only advertises
support from the disk layer if PMAP_HAS_DMAP is true).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e0734dbf-745c-632b-c158-084b212baa16>