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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Mar 2023 13:57:19 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Tianfei Zhang <tianfei.zhang@...el.com>
cc:     richardcochran@...il.com, Netdev <netdev@...r.kernel.org>,
        linux-fpga@...r.kernel.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        vinicius.gomes@...el.com, pierre-louis.bossart@...ux.intel.com,
        marpagan@...hat.com, Russ Weight <russell.h.weight@...el.com>,
        matthew.gerlach@...ux.intel.com, nico@...xnic.net,
        Raghavendra Khadatare <raghavendrax.anand.khadatare@...el.com>
Subject: Re: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards

On Tue, 28 Mar 2023, Tianfei Zhang wrote:

> Adding a DFL (Device Feature List) device driver of ToD device for
> Intel FPGA cards.
> 
> The Intel FPGA Time of Day(ToD) IP within the FPGA DFL bus is exposed
> as PTP Hardware clock(PHC) device to the Linux PTP stack to synchronize
> the system clock to its ToD information using phc2sys utility of the
> Linux PTP stack. The DFL is a hardware List within FPGA, which defines
> a linked list of feature headers within the device MMIO space to provide
> an extensible way of adding subdevice features.
> 
> Signed-off-by: Raghavendra Khadatare <raghavendrax.anand.khadatare@...el.com>
> Signed-off-by: Tianfei Zhang <tianfei.zhang@...el.com>
> 
> ---
> v3:
> - add PTP_1588_CLOCK dependency for PTP_DFL_TOD in Kconfig file.
> - don't need handle NULL case for ptp_clock_register() after adding
>   PTP_1588_CLOCK dependency.
> - wrap the code at 80 characters.
> 
> v2:
> - handle NULL for ptp_clock_register().
> - use readl_poll_timeout_atomic() instead of readl_poll_timeout(), and
>   change the interval timeout to 10us.
> - fix the uninitialized variable.
> ---

> diff --git a/drivers/ptp/ptp_dfl_tod.c b/drivers/ptp/ptp_dfl_tod.c
> new file mode 100644
> index 000000000000..f699d541b360
> --- /dev/null
> +++ b/drivers/ptp/ptp_dfl_tod.c
> @@ -0,0 +1,332 @@
> +#include <linux/bitfield.h>
> +#include <linux/delay.h>
> +#include <linux/dfl.h>
> +#include <linux/gcd.h>
> +#include <linux/iopoll.h>
> +#include <linux/module.h>
> +#include <linux/ptp_clock_kernel.h>
> +#include <linux/spinlock.h>
> +#include <linux/units.h>

> +static int dfl_tod_probe(struct dfl_device *ddev)
> +{
> +	struct device *dev = &ddev->dev;
> +	struct dfl_tod *dt;
> +
> +	dt = devm_kzalloc(dev, sizeof(*dt), GFP_KERNEL);

+ #include <linux/device.h>

Other than that,

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ