linux-snps-arc.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARC fixes for 6.12
@ 2024-10-16  5:27 Vineet Gupta
  2024-10-16  5:27 ` [PATCH 1/3] arc: rename aux.h to arc_aux.h Vineet Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vineet Gupta @ 2024-10-16  5:27 UTC (permalink / raw)
  To: linux-snps-arc; +Cc: linux-kernel, Vineet Gupta

Hi,

Changes slated for a near future rc.

Thx,
-Vineet

Benjamin Szőke (1):
  arc: rename aux.h to arc_aux.h

Paul E. McKenney (1):
  ARC: build: Use __force to suppress per-CPU cmpxchg warnings

Vineet Gupta (1):
  ARC: build: disallow invalid PAE40 + 4K page config

 arch/arc/Kconfig                     | 4 ++--
 arch/arc/include/asm/arcregs.h       | 2 +-
 arch/arc/include/asm/cmpxchg.h       | 2 +-
 arch/arc/include/asm/mmu-arcv2.h     | 2 +-
 include/soc/arc/{aux.h => arc_aux.h} | 0
 include/soc/arc/mcip.h               | 2 +-
 include/soc/arc/timers.h             | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
 rename include/soc/arc/{aux.h => arc_aux.h} (100%)

-- 
2.43.0


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] arc: rename aux.h to arc_aux.h
  2024-10-16  5:27 [PATCH 0/3] ARC fixes for 6.12 Vineet Gupta
@ 2024-10-16  5:27 ` Vineet Gupta
  2024-10-16  5:27 ` [PATCH 2/3] ARC: build: disallow invalid PAE40 + 4K page config Vineet Gupta
  2024-10-16  5:27 ` [PATCH 3/3] ARC: build: Use __force to suppress per-CPU cmpxchg warnings Vineet Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Vineet Gupta @ 2024-10-16  5:27 UTC (permalink / raw)
  To: linux-snps-arc
  Cc: linux-kernel, Benjamin Szőke, Shahab Vahedi, Vineet Gupta

From: Benjamin Szőke <egyszeregy@freemail.hu>

The goal is to clean-up Linux repository from AUX file names, because
the use of such file names is prohibited on other operating systems
such as Windows, so the Linux repository cannot be cloned and
edited on them.

Reviewed-by: Shahab Vahedi <list+bpf@vahedi.org>
Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
 arch/arc/include/asm/arcregs.h       | 2 +-
 arch/arc/include/asm/mmu-arcv2.h     | 2 +-
 include/soc/arc/{aux.h => arc_aux.h} | 0
 include/soc/arc/mcip.h               | 2 +-
 include/soc/arc/timers.h             | 2 +-
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename include/soc/arc/{aux.h => arc_aux.h} (100%)

diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 4b13f60fe7ca..005d9e4d187a 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -146,7 +146,7 @@
 
 #ifndef __ASSEMBLY__
 
-#include <soc/arc/aux.h>
+#include <soc/arc/arc_aux.h>
 
 /* Helpers */
 #define TO_KB(bytes)		((bytes) >> 10)
diff --git a/arch/arc/include/asm/mmu-arcv2.h b/arch/arc/include/asm/mmu-arcv2.h
index d85dc0721907..41412642f279 100644
--- a/arch/arc/include/asm/mmu-arcv2.h
+++ b/arch/arc/include/asm/mmu-arcv2.h
@@ -9,7 +9,7 @@
 #ifndef _ASM_ARC_MMU_ARCV2_H
 #define _ASM_ARC_MMU_ARCV2_H
 
-#include <soc/arc/aux.h>
+#include <soc/arc/arc_aux.h>
 
 /*
  * TLB Management regs
diff --git a/include/soc/arc/aux.h b/include/soc/arc/arc_aux.h
similarity index 100%
rename from include/soc/arc/aux.h
rename to include/soc/arc/arc_aux.h
diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h
index d1a93c73f006..a78dacd149f1 100644
--- a/include/soc/arc/mcip.h
+++ b/include/soc/arc/mcip.h
@@ -8,7 +8,7 @@
 #ifndef __SOC_ARC_MCIP_H
 #define __SOC_ARC_MCIP_H
 
-#include <soc/arc/aux.h>
+#include <soc/arc/arc_aux.h>
 
 #define ARC_REG_MCIP_BCR	0x0d0
 #define ARC_REG_MCIP_IDU_BCR	0x0D5
diff --git a/include/soc/arc/timers.h b/include/soc/arc/timers.h
index ae99d3e855f1..51a74166296c 100644
--- a/include/soc/arc/timers.h
+++ b/include/soc/arc/timers.h
@@ -6,7 +6,7 @@
 #ifndef __SOC_ARC_TIMERS_H
 #define __SOC_ARC_TIMERS_H
 
-#include <soc/arc/aux.h>
+#include <soc/arc/arc_aux.h>
 
 /* Timer related Aux registers */
 #define ARC_REG_TIMER0_LIMIT	0x23	/* timer 0 limit */
-- 
2.43.0


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ARC: build: disallow invalid PAE40 + 4K page config
  2024-10-16  5:27 [PATCH 0/3] ARC fixes for 6.12 Vineet Gupta
  2024-10-16  5:27 ` [PATCH 1/3] arc: rename aux.h to arc_aux.h Vineet Gupta
@ 2024-10-16  5:27 ` Vineet Gupta
  2024-10-16  5:27 ` [PATCH 3/3] ARC: build: Use __force to suppress per-CPU cmpxchg warnings Vineet Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Vineet Gupta @ 2024-10-16  5:27 UTC (permalink / raw)
  To: linux-snps-arc; +Cc: linux-kernel, Vineet Gupta, kernel test robot

The config option being built was
| CONFIG_ARC_MMU_V4=y
| CONFIG_ARC_PAGE_SIZE_4K=y
| CONFIG_HIGHMEM=y
| CONFIG_ARC_HAS_PAE40=y

This was hitting a BUILD_BUG_ON() since a 4K page can't hoist 1k, 8-byte
PTE entries (8 byte due to PAE40). BUILD_BUG_ON() is a good last ditch
resort, but such a config needs to be disallowed explicitly in Kconfig.

Side-note: the actual fix is single liner dependency, but while at it
cleaned out a few things:
 - 4K dependency on MMU v3 or v4 is always true, since 288ff7de62af09
   ("ARC: retire MMUv1 and MMUv2 support")
 - PAE40 dependency in on MMU ver not really ISA, although that follows
   eventually.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409160223.xydgucbY-lkp@intel.com/
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
 arch/arc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 5b2488142041..69c6e71fa1e6 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -297,7 +297,6 @@ config ARC_PAGE_SIZE_16K
 config ARC_PAGE_SIZE_4K
 	bool "4KB"
 	select HAVE_PAGE_SIZE_4KB
-	depends on ARC_MMU_V3 || ARC_MMU_V4
 
 endchoice
 
@@ -474,7 +473,8 @@ config HIGHMEM
 
 config ARC_HAS_PAE40
 	bool "Support for the 40-bit Physical Address Extension"
-	depends on ISA_ARCV2
+	depends on MMU_V4
+	depends on !ARC_PAGE_SIZE_4K
 	select HIGHMEM
 	select PHYS_ADDR_T_64BIT
 	help
-- 
2.43.0


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ARC: build: Use __force to suppress per-CPU cmpxchg warnings
  2024-10-16  5:27 [PATCH 0/3] ARC fixes for 6.12 Vineet Gupta
  2024-10-16  5:27 ` [PATCH 1/3] arc: rename aux.h to arc_aux.h Vineet Gupta
  2024-10-16  5:27 ` [PATCH 2/3] ARC: build: disallow invalid PAE40 + 4K page config Vineet Gupta
@ 2024-10-16  5:27 ` Vineet Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Vineet Gupta @ 2024-10-16  5:27 UTC (permalink / raw)
  To: linux-snps-arc
  Cc: linux-kernel, Paul E. McKenney, kernel test robot, Vineet Gupta

From: "Paul E. McKenney" <paulmck@kernel.org>

Currently, the cast of the first argument to cmpxchg_emu_u8() drops the
__percpu address-space designator, which results in sparse complaints
when applying cmpxchg() to per-CPU variables in ARC.  Therefore, use
__force to suppress these complaints, given that this does not pertain
to cmpxchg() semantics, which are plently well-defined on variables in
general, whether per-CPU or otherwise.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409251336.ToC0TvWB-lkp@intel.com/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: <linux-snps-arc@lists.infradead.org>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
 arch/arc/include/asm/cmpxchg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h
index 58045c898340..76f43db0890f 100644
--- a/arch/arc/include/asm/cmpxchg.h
+++ b/arch/arc/include/asm/cmpxchg.h
@@ -48,7 +48,7 @@
 									\
 	switch(sizeof((_p_))) {						\
 	case 1:								\
-		_prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)_p_, (uintptr_t)_o_, (uintptr_t)_n_);	\
+		_prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, (uintptr_t)_o_, (uintptr_t)_n_);	\
 		break;							\
 	case 4:								\
 		_prev_ = __cmpxchg(_p_, _o_, _n_);			\
-- 
2.43.0


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-16  5:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16  5:27 [PATCH 0/3] ARC fixes for 6.12 Vineet Gupta
2024-10-16  5:27 ` [PATCH 1/3] arc: rename aux.h to arc_aux.h Vineet Gupta
2024-10-16  5:27 ` [PATCH 2/3] ARC: build: disallow invalid PAE40 + 4K page config Vineet Gupta
2024-10-16  5:27 ` [PATCH 3/3] ARC: build: Use __force to suppress per-CPU cmpxchg warnings Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).