Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -eu +o pipefail
tmp="$(mktemp)"
cp .config "${tmp}"
cleanup() {
trap - EXIT
cp "${tmp}" .config
[ 0.000000] Linux version 4.19.0-rc1+ (pburton@pburton-laptop) (gcc version 8.1.0 (GCC)) #1 PREEMPT Fri Aug 31 13:26:40 PDT 2018
[ 0.000000] CPU0 revision is: 3ee1024f (Ingenic JZRISC)
[ 0.000000] FPU revision is: 00330000
[ 0.000000] MIPS: machine is img,ci20
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 10000000 @ 00000000 (usable)
[ 0.000000] memory: 30000000 @ 30000000 (usable)
[ 0.000000] earlycon: jz4780_uart0 at MMIO 0x10034000 (options '')
[ 0.000000] bootconsole [jz4780_uart0] enabled
[ 0.000000] cma: Reserved 32 MiB at 0x0e000000
@paulburton
paulburton / ci20-clk.diff
Created July 23, 2018 17:05
Ci20 clk_summary diff
--- ci20-clk.txt 2018-07-23 10:01:50.208091103 -0700
+++ ci20-clk-pc.txt 2018-07-23 10:02:58.591727593 -0700
@@ -3,7 +3,17 @@
clock count count count rate accuracy phase
----------------------------------------------------------------------------------------
rtc 0 0 0 32768 0 0
- ext 10 10 0 48000000 0 0
+ wdt 0 0 0 32768 0 0
+ ext 12 12 0 48000000 0 0
+ ost 0 0 0 48000000 0 0
# cat /sys/kernel/debug/clk/clk_summary
enable prepare protect
clock count count count rate accuracy phase
----------------------------------------------------------------------------------------
rtc 0 0 0 32768 0 0
wdt 0 0 0 32768 0 0
ext 12 12 0 48000000 0 0
ost 0 0 0 48000000 0 0
timer7 0 0 0 48000000 0 0
timer6 0 0 0 48000000 0 0
@paulburton
paulburton / mips-ioremap-ram.patch
Last active July 5, 2018 18:38
Rough MIPS __ioremap RAM check fix
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index 1986e09fb457..19ffd8370db4 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -9,6 +9,7 @@
#include <linux/export.h>
#include <asm/addrspace.h>
#include <asm/byteorder.h>
+#include <linux/ioport.h>
#include <linux/sched.h>
/*
* CPU Affinity Test
*
* Author: Paul Burton <paul.burton@mips.com>
*
* This program attempts to reproduce a bug discovered in Linux's handling of
* CPU hotplug, which causes the sched_setaffinity() syscall to fail to migrate
* a task away from a CPU which it is no longer eligible to run on.
*
* It spawns 1 thread that continuously offlines & re-onlines a bunch of CPUs,