<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/arc/include, branch v6.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-02-09T23:57:48Z</updated>
<entry>
<title>work around gcc bugs with 'asm goto' with outputs</title>
<updated>2024-02-09T23:57:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-02-09T20:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4356e9f841f7fbb945521cef3577ba394c65f3fc'/>
<id>urn:sha1:4356e9f841f7fbb945521cef3577ba394c65f3fc</id>
<content type='text'>
We've had issues with gcc and 'asm goto' before, and we created a
'asm_volatile_goto()' macro for that in the past: see commits
3f0116c3238a ("compiler/gcc4: Add quirk for 'asm goto' miscompilation
bug") and a9f180345f53 ("compiler/gcc4: Make quirk for
asm_volatile_goto() unconditional").

Then, much later, we ended up removing the workaround in commit
43c249ea0b1e ("compiler-gcc.h: remove ancient workaround for gcc PR
58670") because we no longer supported building the kernel with the
affected gcc versions, but we left the macro uses around.

Now, Sean Christopherson reports a new version of a very similar
problem, which is fixed by re-applying that ancient workaround.  But the
problem in question is limited to only the 'asm goto with outputs'
cases, so instead of re-introducing the old workaround as-is, let's
rename and limit the workaround to just that much less common case.

It looks like there are at least two separate issues that all hit in
this area:

 (a) some versions of gcc don't mark the asm goto as 'volatile' when it
     has outputs:

        https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98619
        https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110420

     which is easy to work around by just adding the 'volatile' by hand.

 (b) Internal compiler errors:

        https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422

     which are worked around by adding the extra empty 'asm' as a
     barrier, as in the original workaround.

but the problem Sean sees may be a third thing since it involves bad
code generation (not an ICE) even with the manually added 'volatile'.

but the same old workaround works for this case, even if this feels a
bit like voodoo programming and may only be hiding the issue.

Reported-and-tested-by: Sean Christopherson &lt;seanjc@google.com&gt;
Link: https://lore.kernel.org/all/20240208220604.140859-1-seanjc@google.com/
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Cc: Jakub Jelinek &lt;jakub@redhat.com&gt;
Cc: Andrew Pinski &lt;quic_apinski@quicinc.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'percpu-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu</title>
<updated>2024-01-18T23:01:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-18T23:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7ded27593bf0aff08d18258251e3de0a2697f47'/>
<id>urn:sha1:e7ded27593bf0aff08d18258251e3de0a2697f47</id>
<content type='text'>
Pull percpu updates from Dennis Zhou:
 "Enable percpu page allocator for RISC-V.

  There are RISC-V configurations with sparse NUMA configurations and
  small vmalloc space causing dynamic percpu allocations to fail as the
  backing chunk stride is too far apart"

* tag 'percpu-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
  riscv: Enable pcpu page first chunk allocator
  mm: Introduce flush_cache_vmap_early()
</content>
</entry>
<entry>
<title>Merge tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic</title>
<updated>2024-01-11T02:13:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-11T02:13:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c29901006179c4c87f9335771e50814ec5707239'/>
<id>urn:sha1:c29901006179c4c87f9335771e50814ec5707239</id>
<content type='text'>
Pull asm-generic cleanups from Arnd Bergmann:
 "A series from Baoquan He cleans up the asm-generic/io.h to remove the
  ioremap_uc() definition from everything except x86, which still needs
  it for pre-PAT systems. This series notably contains a patch from
  Jiaxun Yang that converts MIPS to use asm-generic/io.h like every
  other architecture does, enabling future cleanups.

  Some of my own patches fix -Wmissing-prototype warnings in
  architecture specific code across several architectures. This is now
  needed as the warning is enabled by default. There are still some
  remaining warnings in minor platforms, but the series should catch
  most of the widely used ones make them more consistent with one
  another.

  David McKay fixes a bug in __generic_cmpxchg_local() when this is used
  on 64-bit architectures. This could currently only affect parisc64 and
  sparc64.

  Additional cleanups address from Linus Walleij, Uwe Kleine-König,
  Thomas Huth, and Kefeng Wang help reduce unnecessary inconsistencies
  between architectures"

* tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  asm-generic: Fix 32 bit __generic_cmpxchg_local
  Hexagon: Make pfn accessors statics inlines
  ARC: mm: Make virt_to_pfn() a static inline
  mips: remove extraneous asm-generic/iomap.h include
  sparc: Use $(kecho) to announce kernel images being ready
  arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes
  csky: fix arch_jump_label_transform_static override
  arch: add do_page_fault prototypes
  arch: add missing prepare_ftrace_return() prototypes
  arch: vdso: consolidate gettime prototypes
  arch: include linux/cpu.h for trap_init() prototype
  arch: fix asm-offsets.c building with -Wmissing-prototypes
  arch: consolidate arch_irq_work_raise prototypes
  hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header
  asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr()
  mips: io: remove duplicated codes
  arch/*/io.h: remove ioremap_uc in some architectures
  mips: add &lt;asm-generic/io.h&gt; including
</content>
</entry>
<entry>
<title>mm: Introduce flush_cache_vmap_early()</title>
<updated>2023-12-14T08:23:17Z</updated>
<author>
<name>Alexandre Ghiti</name>
<email>alexghiti@rivosinc.com</email>
</author>
<published>2023-12-12T21:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a92fc8b4d20680e4c20289a670d8fca2d1f2c1b'/>
<id>urn:sha1:7a92fc8b4d20680e4c20289a670d8fca2d1f2c1b</id>
<content type='text'>
The pcpu setup when using the page allocator sets up a new vmalloc
mapping very early in the boot process, so early that it cannot use the
flush_cache_vmap() function which may depend on structures not yet
initialized (for example in riscv, we currently send an IPI to flush
other cpus TLB).

But on some architectures, we must call flush_cache_vmap(): for example,
in riscv, some uarchs can cache invalid TLB entries so we need to flush
the new established mapping to avoid taking an exception.

So fix this by introducing a new function flush_cache_vmap_early() which
is called right after setting the new page table entry and before
accessing this new mapping. This new function implements a local flush
tlb on riscv and is no-op for other architectures (same as today).

Signed-off-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Dennis Zhou &lt;dennis@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: add hugetlb definitions</title>
<updated>2023-12-14T03:33:10Z</updated>
<author>
<name>Pavel Kozlov</name>
<email>pavel.kozlov@synopsys.com</email>
</author>
<published>2023-12-13T15:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a733dc4fbeec3f6d99645b845712b035e7440cf'/>
<id>urn:sha1:9a733dc4fbeec3f6d99645b845712b035e7440cf</id>
<content type='text'>
Add hugetlb definitions if THP enabled. ARC doesn't support
HugeTLB FS but it supports THP. Some kernel code such as pagemap
uses hugetlb definitions with THP.

This patch fixes ARC build issue (HPAGE_SIZE undeclared error) with
TRANSPARENT_HUGEPAGE enabled.

Signed-off-by: Pavel Kozlov &lt;pavel.kozlov@synopsys.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: retire support for aliasing VIPT D$</title>
<updated>2023-12-09T00:30:24Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2023-02-16T05:06:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6732c0e494ac35fbadd749bbbd226c0aceb2d2c4'/>
<id>urn:sha1:6732c0e494ac35fbadd749bbbd226c0aceb2d2c4</id>
<content type='text'>
Legacy ARC700 processors (first generation of MMU enabled ARC cores) had
VIPT cached which could be configured such that they could alias.
Corresponding support in kernel (with all the obnoxious cache flush overhead)
was added in ARC port 10 years ago to support 1 silicon. That is long bygone
and we can let it RIP.

Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: entry: move ARCompact specific bits out of entry.h</title>
<updated>2023-12-09T00:30:24Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2020-05-20T18:23:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a02ec2f0b304af6b38e9cc5a009bf517d38e72c'/>
<id>urn:sha1:3a02ec2f0b304af6b38e9cc5a009bf517d38e72c</id>
<content type='text'>
 - PUSHAUX/POPAUX helpers to ARCompact entry
 - use gas provided "push"/pop pseudo instructions

Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: entry: SAVE_ABI_CALLEE_REG: ISA/ABI specific helper</title>
<updated>2023-12-09T00:30:24Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@kernel.org</email>
</author>
<published>2020-05-21T20:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9de7fc30f288ccee11c74613b9a0ee4904f6875f'/>
<id>urn:sha1:9de7fc30f288ccee11c74613b9a0ee4904f6875f</id>
<content type='text'>
And for ARcompact variant replace the PUSH/POP macros with gas provided
push/pop pseudo-instructions

This allows ISA specific implementation

e.g. Current ARCv2 PUSH/POP could be replaced with STD/LDL to save 2
registers at a time (w/o bothering with SP update each time) or
perhaps use ENTER_S/LEAVE_S to reduce code size

For ARCv3 ABI changed so callee regs are now r14-r26 (vs. r13-r25)
thus would need a different implementation.

Signed-off-by: Vineet Gupta &lt;vgupta@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARC: mm: Make virt_to_pfn() a static inline</title>
<updated>2023-12-05T12:11:37Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2023-11-15T13:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da4382a7207e7d2243b860146442243a8daf33de'/>
<id>urn:sha1:da4382a7207e7d2243b860146442243a8daf33de</id>
<content type='text'>
Making virt_to_pfn() a static inline taking a strongly typed
(const void *) makes the contract of a passing a pointer of that
type to the function explicit and exposes any misuse of the
macro virt_to_pfn() acting polymorphic and accepting many types
such as (void *), (unitptr_t) or (unsigned long) as arguments
without warnings.

In order to do this we move the virt_to_phys() and
below the definition of the __pa() and __va() macros so it
compiles. The macro version was also able to do recursive
symbol resolution.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>kprobes: unify kprobes_exceptions_nofify() prototypes</title>
<updated>2023-11-10T10:59:05Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-11-10T10:59:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=abc28463c81853e4fdf8d009f71b2a3ce62a6f40'/>
<id>urn:sha1:abc28463c81853e4fdf8d009f71b2a3ce62a6f40</id>
<content type='text'>
Most architectures that support kprobes declare this function in their
own asm/kprobes.h header and provide an override, but some are missing
the prototype, which causes a warning for the __weak stub implementation:

kernel/kprobes.c:1865:12: error: no previous prototype for 'kprobe_exceptions_notify' [-Werror=missing-prototypes]
 1865 | int __weak kprobe_exceptions_notify(struct notifier_block *self,

Move the prototype into linux/kprobes.h so it is visible to all
the definitions.

Link: https://lore.kernel.org/all/20231108125843.3806765-4-arnd@kernel.org/

Acked-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
</content>
</entry>
</feed>
