lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190724.130702.1012545920232372108.davem@davemloft.net>
Date:   Wed, 24 Jul 2019 13:07:02 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     snelson@...sando.io
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH v4 net-next 02/19] ionic: Add hardware init and device
 commands

From: Shannon Nelson <snelson@...sando.io>
Date: Wed, 24 Jul 2019 10:49:09 -0700

> On 7/23/19 4:05 PM, David Miller wrote:
>> From: Shannon Nelson <snelson@...sando.io>
>> Date: Tue, 23 Jul 2019 15:50:22 -0700
>>
>>> On 7/23/19 2:18 PM, David Miller wrote:
>>>> From: Shannon Nelson <snelson@...sando.io>
>>>> Date: Mon, 22 Jul 2019 14:40:06 -0700
>>>>
>>>>> +void ionic_init_devinfo(struct ionic_dev *idev)
>>>>> +{
>>>>> + idev->dev_info.asic_type = ioread8(&idev->dev_info_regs->asic_type);
>>>>> + idev->dev_info.asic_rev = ioread8(&idev->dev_info_regs->asic_rev);
>>>>> +
>>>>> +	memcpy_fromio(idev->dev_info.fw_version,
>>>>> +		      idev->dev_info_regs->fw_version,
>>>>> +		      IONIC_DEVINFO_FWVERS_BUFLEN);
>>>>> +
>>>>> +	memcpy_fromio(idev->dev_info.serial_num,
>>>>> +		      idev->dev_info_regs->serial_num,
>>>>> +		      IONIC_DEVINFO_SERIAL_BUFLEN);
>>>>    ...
>>>>> +	sig = ioread32(&idev->dev_info_regs->signature);
>>>> I think if you are going to use the io{read,write}{8,16,32,64}()
>>>> interfaces then you should use io{read,write}{8,16,32,64}_rep()
>>>> instead of memcpy_{to,from}io().
>>>>
>>> Sure.
>> Note, I could be wrong.  Please test.
>>
>> I think the operation of the two things might be different.
> Yes, they are different things, the iowrite*_rep() functions write
> each value from a buffer all to the same single address, rather than
> copy a buffer into another buffer, and the ioread*_rep() functions
> repeatedly read from the same address to fill a buffer.
> 
> For example, the iowrite32_rep() boils down to this:
>         do {
>             __raw_writel(*buf++, addr);
>         } while (--count);
> 
> Not quite what I need.

That's what I suspected.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ