[linux-yocto] [linux-yocto-rt][PATCH 0/2] Backport two rt patches to fix build error for powerpc
There are tow errors when compiling powerpc rt kernel. 1. Error: operand out of range (0x00208690 is not between 0x and 0x) 2. error: implicit declaration of function 'printk_safe_flush_on_panic' There are for v5.0/standard/preempt-rt/base John Ogness (1): printk: An all-in-one commit to fix build failures Sebastian Andrzej Siewior (1): powerpc: reshuffle TIF bits arch/powerpc/include/asm/thread_info.h | 13 - arch/powerpc/kernel/entry_32.S | 12 +++- arch/powerpc/kernel/entry_64.S | 12 +++- arch/powerpc/kernel/traps.c| 1 - arch/powerpc/kernel/watchdog.c | 5 - kernel/printk/printk.c | 16 ++-- lib/printk_ringbuffer.c| 8 +++- 7 files changed, 43 insertions(+), 24 deletions(-) -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 1/2] powerpc: reshuffle TIF bits
From: Sebastian Andrzej Siewior Powerpc32/64 does not compile because TIF_SYSCALL_TRACE's bit is higher than 15 and the assembly instructions don't expect that. Move TIF_RESTOREALL, TIF_NOERROR to the higher bits and keep TIF_NEED_RESCHED_LAZY in the lower range. As a result one split load is needed and otherwise we can use immediates. Signed-off-by: Sebastian Andrzej Siewior Backport a commit from linux-v5.0.5-rt3 to to fix the following build error for powerpc: [https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-5.0.y-rt=140bf8deb0fa9607a85ecd6241d64e80c7817e8c] Error: operand out of range (0x00208690 is not between 0x and 0x) Signed-off-by: Hongzhi.Song --- arch/powerpc/include/asm/thread_info.h | 13 - arch/powerpc/kernel/entry_32.S | 12 +++- arch/powerpc/kernel/entry_64.S | 12 +++- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 7e542e7..f913239 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -90,7 +90,7 @@ void arch_setup_new_exec(void); /* * thread information flag bit numbers */ -#define TIF_NEED_RESCHED_LAZY 0 /* lazy rescheduling necessary */ +#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ #define TIF_SIGPENDING 1 /* signal pending */ #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_FSCHECK3 /* Check FS is USER_DS on return */ @@ -101,11 +101,12 @@ void arch_setup_new_exec(void); #define TIF_SINGLESTEP 8 /* singlestepping active */ #define TIF_NOHZ 9 /* in adaptive nohz mode */ #define TIF_SECCOMP10 /* secure computing */ -#define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ -#define TIF_NOERROR12 /* Force successful syscall return */ + +#define TIF_NEED_RESCHED_LAZY 11 /* lazy rescheduling necessary */ +#define TIF_SYSCALL_TRACEPOINT 12 /* syscall tracepoint instrumentation */ + #define TIF_NOTIFY_RESUME 13 /* callback before returning to user */ #define TIF_UPROBE 14 /* breakpointed or single-stepping */ -#define TIF_SYSCALL_TRACEPOINT 15 /* syscall tracepoint instrumentation */ #define TIF_EMULATE_STACK_STORE16 /* Is an instruction emulation for stack store? */ #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ @@ -114,7 +115,9 @@ void arch_setup_new_exec(void); #endif #define TIF_POLLING_NRFLAG 19 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_32BIT 20 /* 32 bit binary */ -#define TIF_SYSCALL_TRACE 21 /* syscall trace active */ +#define TIF_RESTOREALL 21 /* Restore all regs (implies NOERROR) */ +#define TIF_NOERROR22 /* Force successful syscall return */ + /* as above, but as bit values */ #define _TIF_SYSCALL_TRACE (1
[linux-yocto] [PATCH 2/2] printk: An all-in-one commit to fix build failures
From: John Ogness This commit contains addresses several build failures which were reported by the kbuild test robot. The fixes were folded into the original commits. Reported-by: kbuild test robot Signed-off-by: John Ogness Signed-off-by: Sebastian Andrzej Siewior Backport the commit from linux-v5.0.5-rt3 to to fix the following build error for powerpc: [https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-5.0.y-rt=bb54b39acf40a4fe4c112127e0a1497b9f6072b7] error: implicit declaration of function 'printk_safe_flush_on_panic' Signed-off-by: Hongzhi.Song --- arch/powerpc/kernel/traps.c| 1 - arch/powerpc/kernel/watchdog.c | 5 - kernel/printk/printk.c | 16 ++-- lib/printk_ringbuffer.c| 8 +++- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 64936b6..955a7c1 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -174,7 +174,6 @@ extern void panic_flush_kmsg_start(void) extern void panic_flush_kmsg_end(void) { - printk_safe_flush_on_panic(); kmsg_dump(KMSG_DUMP_PANIC); bust_spinlocks(0); debug_locks_off(); diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c index 3c6ab22..bf98181 100644 --- a/arch/powerpc/kernel/watchdog.c +++ b/arch/powerpc/kernel/watchdog.c @@ -181,11 +181,6 @@ static void watchdog_smp_panic(int cpu, u64 tb) wd_smp_unlock(); - printk_safe_flush(); - /* -* printk_safe_flush() seems to require another print -* before anything actually goes out to console. -*/ if (sysctl_hardlockup_all_cpu_backtrace) trigger_allbutself_cpu_backtrace(); diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 5cfd8ea..997d07b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -370,6 +370,18 @@ static u64 clear_seq; #define LOG_LEVEL(v) ((v) & 0x07) #define LOG_FACILITY(v)((v) >> 3 & 0xff) +/* Return log buffer address */ +char *log_buf_addr_get(void) +{ + return printk_rb.buffer; +} + +/* Return log buffer size */ +u32 log_buf_len_get(void) +{ + return (1 << printk_rb.size_bits); +} + /* human readable text of the record */ static char *log_text(const struct printk_log *msg) { @@ -1910,7 +1922,7 @@ asmlinkage int vprintk_emit(int facility, int level, } EXPORT_SYMBOL(vprintk_emit); -__printf(1, 0) int vprintk_func(const char *fmt, va_list args) +static __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args); } @@ -2684,7 +2696,7 @@ static int __init init_printk_kthread(void) } late_initcall(init_printk_kthread); -int vprintk_deferred(const char *fmt, va_list args) +static int vprintk_deferred(const char *fmt, va_list args) { return vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args); } diff --git a/lib/printk_ringbuffer.c b/lib/printk_ringbuffer.c index ce33b5a..9a31d7d 100644 --- a/lib/printk_ringbuffer.c +++ b/lib/printk_ringbuffer.c @@ -196,8 +196,14 @@ void prb_commit(struct prb_handle *h) if (changed) { atomic_long_inc(>wq_counter); - if (wq_has_sleeper(rb->wq)) + if (wq_has_sleeper(rb->wq)) { +#ifdef CONFIG_IRQ_WORK irq_work_queue(rb->wq_work); +#else + if (!in_nmi()) + wake_up_interruptible_all(rb->wq); +#endif + } } } -- 2.8.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] v4.18.x - stable updates comprising v4.18.34
On Mon, Apr 8, 2019 at 11:25 AM Paul Gortmaker wrote: > > Bruce, Yocto kernel folks: > > Here is the next 4.18.x stable update "extension" primarily created > for the Yocto project, continuing from the previous v4.18.33 release. > > There are just over 160 commits here, based on commits chosen from what > was used in the recent 4.19.32 stable release. > > That warrants an additional note - the 4.19.32 release contained powerpc > changes related to spectre stuff, which built on related commits added > between 4.18 and 4.19-rc1 releases. So I had to circle back to that > window and pick up those prerequisites. Fortunately older stable > releases like 4.14.x provided additional guidance on what that commit > list should contain. That also uncovered a build fail in one of the > ppc64 defconfigs, which required backport of another recent fix. That > said, the number of commits and the impact was nowhere near what we saw > on earlier kernel versions for x86-64 -- only about 2 doz. commits here. > > I've put this 4.18.x queue through the usual testing; build testing > on x86-64/32, ARM-64/32, PPC and MIPS, plus some static analysis > and finally some sanity runtime tests on x86-64. > > I did the signed tag just as per the previously released versions. > Please find a signed v4.18.34 tag using this key: > > http://pgp.mit.edu/pks/lookup?op=vindex=0xEBCE84042C07D1D6 > > in the repo in the kernel.org directory here: > > > https://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git/?h=linux-4.18.y > git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git > > for merge to standard/base in linux-yocto-4.18 and then out from there > into the other base and BSP branches. Everything looked ok to me. This is now merged and pushed. Bruce > > For those who are interested, the evolution of the commits is here: > > https://git.kernel.org/cgit/linux/kernel/git/paulg/longterm-queue-4.18.git/ > > This repo isn't needed for anything; it just exists for transparency and > so people can see the evolution of the raw commits that were originally > selected to create this 4.18.x release. > > Paul. -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto