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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 25 Apr 2022 22:31:54 +0200 From: Horatiu Vultur <horatiu.vultur@...rochip.com> To: Richard Cochran <richardcochran@...il.com> CC: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>, <robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>, <UNGLinuxDriver@...rochip.com> Subject: Re: [PATCH net-next 5/5] net: lan966x: Add support for PTP_PF_EXTTS The 04/24/2022 08:09, Richard Cochran wrote: Hi Richard, > > On Sun, Apr 24, 2022 at 04:58:24PM +0200, Horatiu Vultur wrote: > > > @@ -321,6 +321,63 @@ irqreturn_t lan966x_ptp_irq_handler(int irq, void *args) > > return IRQ_HANDLED; > > } > > > > +irqreturn_t lan966x_ptp_ext_irq_handler(int irq, void *args) > > +{ > > + struct lan966x *lan966x = args; > > + struct lan966x_phc *phc; > > + unsigned long flags; > > + u64 time = 0; > > + time64_t s; > > + int pin, i; > > + s64 ns; > > + > > + if (!(lan_rd(lan966x, PTP_PIN_INTR))) > > + return IRQ_NONE; > > + > > + /* Go through all domains and see which pin generated the interrupt */ > > + for (i = 0; i < LAN966X_PHC_COUNT; ++i) { > > + struct ptp_clock_event ptp_event = {0}; > > + > > + phc = &lan966x->phc[i]; > > + pin = ptp_find_pin(phc->clock, PTP_PF_EXTTS, 0); > > Not safe to call ptp_find_pin() from ISR. See comment in include/linux/ptp_clock_kernel.h Good catch. >From what I can see, I should be able to use ptp_find_pin_unlocked. > > Thanks, > Richard -- /Horatiu
Powered by blists - more mailing lists