diff mbox

[v3,08/18] baycom_epp: Replace rdtscl() with native_read_tsc()

Message ID 1195ce0c7f34169ff3006341b77806184a46b9bf.1434501121.git.luto@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Lutomirski June 17, 2015, 12:35 a.m. UTC
This is only used if BAYCOM_DEBUG is defined.

Cc: walter harms <wharms@bfs.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Thomas Sailer <t.sailer@alumni.ethz.ch>
Cc: linux-hams@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---

I'm hoping for an ack for this to go through -tip.

 drivers/net/hamradio/baycom_epp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Sailer June 17, 2015, 12:49 a.m. UTC | #1
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>

On 06/17/2015 02:35 AM, Andy Lutomirski wrote:
> This is only used if BAYCOM_DEBUG is defined.
>
> Cc: walter harms <wharms@bfs.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Thomas Sailer <t.sailer@alumni.ethz.ch>
> Cc: linux-hams@vger.kernel.org
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
>
> I'm hoping for an ack for this to go through -tip.
>
>   drivers/net/hamradio/baycom_epp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
> index 83c7cce0d172..44e5c3b5e0af 100644
> --- a/drivers/net/hamradio/baycom_epp.c
> +++ b/drivers/net/hamradio/baycom_epp.c
> @@ -638,7 +638,7 @@ static int receive(struct net_device *dev, int cnt)
>   #define GETTICK(x)                                                \
>   ({                                                                \
>   	if (cpu_has_tsc)                                          \
> -		rdtscl(x);                                        \
> +		x = (unsigned int)native_read_tsc();		  \
>   })
>   #else /* __i386__ */
>   #define GETTICK(x)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Walter Harms June 20, 2015, 1:54 p.m. UTC | #2
Acked-by: walter harms <wharms@bfs.de>

Am 17.06.2015 02:35, schrieb Andy Lutomirski:
> This is only used if BAYCOM_DEBUG is defined.
> 
> Cc: walter harms <wharms@bfs.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Thomas Sailer <t.sailer@alumni.ethz.ch>
> Cc: linux-hams@vger.kernel.org
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> 
> I'm hoping for an ack for this to go through -tip.
> 
>  drivers/net/hamradio/baycom_epp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
> index 83c7cce0d172..44e5c3b5e0af 100644
> --- a/drivers/net/hamradio/baycom_epp.c
> +++ b/drivers/net/hamradio/baycom_epp.c
> @@ -638,7 +638,7 @@ static int receive(struct net_device *dev, int cnt)
>  #define GETTICK(x)                                                \
>  ({                                                                \
>  	if (cpu_has_tsc)                                          \
> -		rdtscl(x);                                        \
> +		x = (unsigned int)native_read_tsc();		  \
>  })
>  #else /* __i386__ */
>  #define GETTICK(x)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
Thomas Gleixner June 20, 2015, 2:14 p.m. UTC | #3
On Sat, 20 Jun 2015, walter harms wrote:

> Acked-by: walter harms <wharms@bfs.de>
> 
> Am 17.06.2015 02:35, schrieb Andy Lutomirski:
> > This is only used if BAYCOM_DEBUG is defined.

So why don't we just replace that by ktime_get() and get rid of the
x86'ism in that driver.
 
Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
Andy Lutomirski June 20, 2015, 2:26 p.m. UTC | #4
On Sat, Jun 20, 2015 at 7:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Sat, 20 Jun 2015, walter harms wrote:
>
>> Acked-by: walter harms <wharms@bfs.de>
>>
>> Am 17.06.2015 02:35, schrieb Andy Lutomirski:
>> > This is only used if BAYCOM_DEBUG is defined.
>
> So why don't we just replace that by ktime_get() and get rid of the
> x86'ism in that driver.
>

I don't have the hardware, and I don't see any good reason to make an
rdtsc cleanup depend on a more complicated driver change.  On the
other hand, if the maintainers want to clean it up, I think it would
be a great idea.

This really seems to be debugging code, though.  A normal kernel won't
even compile it.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
Thomas Gleixner June 20, 2015, 4:30 p.m. UTC | #5
On Sat, 20 Jun 2015, Andy Lutomirski wrote:
> On Sat, Jun 20, 2015 at 7:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Sat, 20 Jun 2015, walter harms wrote:
> >
> >> Acked-by: walter harms <wharms@bfs.de>
> >>
> >> Am 17.06.2015 02:35, schrieb Andy Lutomirski:
> >> > This is only used if BAYCOM_DEBUG is defined.
> >
> > So why don't we just replace that by ktime_get() and get rid of the
> > x86'ism in that driver.
> >
> 
> I don't have the hardware, and I don't see any good reason to make an
> rdtsc cleanup depend on a more complicated driver change.  On the
> other hand, if the maintainers want to clean it up, I think it would
> be a great idea.
> 
> This really seems to be debugging code, though.  A normal kernel won't
> even compile it.

Right, but there is no reason that we have rdtsc outside of arch/x86
at all.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
diff mbox

Patch

diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 83c7cce0d172..44e5c3b5e0af 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -638,7 +638,7 @@  static int receive(struct net_device *dev, int cnt)
 #define GETTICK(x)                                                \
 ({                                                                \
 	if (cpu_has_tsc)                                          \
-		rdtscl(x);                                        \
+		x = (unsigned int)native_read_tsc();		  \
 })
 #else /* __i386__ */
 #define GETTICK(x)