Re: pckbc_cd

2018-12-30 Thread Kamil Rytarowski
On 30.12.2018 17:12, Jason Thorpe wrote:
> 
> 
>> On Dec 30, 2018, at 7:59 AM, Kamil Rytarowski  wrote:
>>
>> On 30.12.2018 16:51, co...@sdf.org wrote:
>>> Thanks.
>>>
>>> I'm not sure if it is a sufficient explanation though, there's a
>>> CFATTACH_DECL_NEW(pckbc_acpi, ...
>>> but no
>>> CFATTACH_DCEL_NEW(pckbc, ..
>>>
>>> Or does that work somehow?
>>>
>>
>> During the kernel config process you will get ioconf.c that has inlined:
>>
>> static const struct cfiattrdata * const pckbc_attrs[] = {
>> _iattrdata, NULL };
>> CFDRIVER_DECL(pckbc, DV_DULL, pckbc_attrs);
> 
> That's a cfdriver, not a cfattach.
> 

The original question was about cfdriver.



signature.asc
Description: OpenPGP digital signature


Re: pckbc_cd

2018-12-30 Thread Jason Thorpe



> On Dec 30, 2018, at 7:59 AM, Kamil Rytarowski  wrote:
> 
> On 30.12.2018 16:51, co...@sdf.org wrote:
>> Thanks.
>> 
>> I'm not sure if it is a sufficient explanation though, there's a
>> CFATTACH_DECL_NEW(pckbc_acpi, ...
>> but no
>> CFATTACH_DCEL_NEW(pckbc, ..
>> 
>> Or does that work somehow?
>> 
> 
> During the kernel config process you will get ioconf.c that has inlined:
> 
> static const struct cfiattrdata * const pckbc_attrs[] = {
> _iattrdata, NULL };
> CFDRIVER_DECL(pckbc, DV_DULL, pckbc_attrs);

That's a cfdriver, not a cfattach.

-- thorpej



Re: pckbc_cd

2018-12-30 Thread Kamil Rytarowski
On 30.12.2018 16:51, co...@sdf.org wrote:
> Thanks.
> 
> I'm not sure if it is a sufficient explanation though, there's a
> CFATTACH_DECL_NEW(pckbc_acpi, ...
> but no
> CFATTACH_DCEL_NEW(pckbc, ..
> 
> Or does that work somehow?
> 

During the kernel config process you will get ioconf.c that has inlined:

static const struct cfiattrdata * const pckbc_attrs[] = {
_iattrdata, NULL };
CFDRIVER_DECL(pckbc, DV_DULL, pckbc_attrs);



signature.asc
Description: OpenPGP digital signature


Re: pckbc_cd

2018-12-30 Thread coypu
Thanks.

I'm not sure if it is a sufficient explanation though, there's a
CFATTACH_DECL_NEW(pckbc_acpi, ...
but no
CFATTACH_DCEL_NEW(pckbc, ..

Or does that work somehow?


Re: pckbc_cd

2018-12-29 Thread Kamil Rytarowski
On 30.12.2018 08:07, co...@sdf.org wrote:
> Hi folks,
> 
> looking at port-i386/43331 I came across pckbc_cd.
> It doens't appear to be defined anywhere or initialized, though there's
> an extern in sys/arch/i386/pnpbios/pckbc_pnpbios.c
> 
> How does this work? how does it compile?! :-)
> 

#define CFDRIVER_DECL(name, class, attrs)   \
struct cfdriver __CONCAT(name,_cd) = {  \
.cd_name= ___STRING(name),  \
.cd_class   = class,\
.cd_attrs   = attrs,\
}



signature.asc
Description: OpenPGP digital signature