Skip to content

Commit 16ae123

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: VDSO: Avoid use of linux/irqchip/mips-gic.h
Our VDSO code makes use of macros from linux/irqchip/mips-gic.h to provide offsets to register values, but these are trivial offsets to the two 32 bit halves of a 64 bit value. Replace use of the macros with zero (ie. omit adding an offset) and the size of the low 32 bit of the value. This removes our need for linux/irqchip/mips-gic.h & prepares us for it to be removed. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17047/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent dd01635 commit 16ae123

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎arch/mips/vdso/gettimeofday.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "vdso.h"
1212

1313
#include <linux/compiler.h>
14-
#include <linux/irqchip/mips-gic.h>
1514
#include <linux/time.h>
1615

1716
#include <asm/clocksource.h>
@@ -125,9 +124,9 @@ static __always_inline u64 read_gic_count(const union mips_vdso_data *data)
125124
u32 hi, hi2, lo;
126125

127126
do {
128-
hi = __raw_readl(gic + GIC_UMV_SH_COUNTER_63_32_OFS);
129-
lo = __raw_readl(gic + GIC_UMV_SH_COUNTER_31_00_OFS);
130-
hi2 = __raw_readl(gic + GIC_UMV_SH_COUNTER_63_32_OFS);
127+
hi = __raw_readl(gic + sizeof(lo));
128+
lo = __raw_readl(gic);
129+
hi2 = __raw_readl(gic + sizeof(lo));
131130
} while (hi2 != hi);
132131

133132
return (((u64)hi) << 32) + lo;

‎include/linux/irqchip/mips-gic.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@
1111
#include <linux/clocksource.h>
1212
#include <linux/ioport.h>
1313

14-
/* User Mode Visible Section Register Map */
15-
#define GIC_UMV_SH_COUNTER_31_00_OFS 0x0000
16-
#define GIC_UMV_SH_COUNTER_63_32_OFS 0x0004
17-
1814
#endif /* __LINUX_IRQCHIP_MIPS_GIC_H */

0 commit comments

Comments
 (0)