Skip to content

Instantly share code, notes, and snippets.

Hello 👋

Krzysztof Wilczyński kwilczynski

Hello 👋
View GitHub Profile
View gist:950f01f6fe15b19159ed38db82558dff
[ 0.000000] Linux version 5.15.0-rc1-00030-ge1f6bad31de3-dirty (kwilczynski@workstation) (alpha-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #7 SMP Thu Sep 16 02:05:12 UTC 2021
[ 0.000000] Booting GENERIC on Tsunami variation Clipper using machine vector Clipper from SRM
[ 0.000000] Major Options: SMP VERBOSE_MCHECK
[ 0.000000] Command line: console=ttyAMA0 console=ttyS0,115200n8 loglevel=8 ignore_loglevel panic=-1 nopat nofgkaslr nokaslr norandmaps earlyprintk=serial,ttyS0 printk.devkmsg=on printk.time=y
[ 0.000000] memcluster 0, usage 1, start 0, end 15
[ 0.000000] memcluster 1, usage 0, start 15, end 32768
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (18700902 bytes)
[ 0.000000] SMP: 1 CPUs probed -- cpu_present_mask = 1
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000ffffffdfff]
View docker-compose.yml
version: '2'
container_name: 'piknik'
image: 'piknik:custom'
hostname: 'piknik'
- 'piknik piknik.lan:'
View gist:88c1c33148cd54a9daf318e6043f4521
version: '2'
container_name: 'piknik'
image: 'piknik:custom'
hostname: 'piknik'
- 'piknik piknik.lan:'
View gist:4b71cef156e40fd565e9833565119a75
+ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ umask 022
+ ARCHS=(['x86_64']='x86_64-linux-gnu-' ['alpha']='alpha-linux-gnu-' ['arm64']='aarch64-linux-gnu-')
+ declare -A ARCHS
+ ARCH=x86_64
+ CROSS_COMPILE=x86_64-linux-gnu-
+ KCFLAGS=-Warray-bounds
++ nproc
View patch.diff
diff --git c/arch/alpha/boot/vmlinux w/arch/alpha/boot/vmlinux
new file mode 100755
index 000000000000..aec4fdb57e52
Binary files /dev/null and w/arch/alpha/boot/vmlinux differ
diff --git c/arch/alpha/kernel/pci-sysfs.c w/arch/alpha/kernel/pci-sysfs.c
index 0021580d79ad..35d0632d0897 100644
--- c/arch/alpha/kernel/pci-sysfs.c
+++ w/arch/alpha/kernel/pci-sysfs.c
@@ -14,6 +14,7 @@
#include <linux/stat.h>
View content.js
// Based on
function walkTextNodes(rootNode) {
let walker = document.createTreeWalker(rootNode, NodeFilter.SHOW_TEXT,
function(node) {
if (node.textContent.length === 0) {
return NodeFilter.FILTER_SKIP;
return NodeFilter.FILTER_ACCEPT
View gist:95aad17edd6b7931afa74120fd727310
make clean
export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
sudo make MATCHCOMPILER=yes HAVE_RULES=yes FILESDIR='/usr/share/cppcheck' CXXFLAGS='-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function' -j$(nproc) install
make clean
make PREFIX='/usr' -j$(nproc)
make DESTDIR='/tmp/sparse' PREFIX='/usr' install
View file.txt
Install the "xdotool" utility as usual on Ubuntu, then go to "/lib/systemd/system-sleep"
directory and create a small shell script called "capslock" with the following content:
case "$1" in
/usr/bin/logger -t suspend -s 'Resetting CapsLock key'
/usr/bin/xdotool --clearmodifiers --delay 500 --repeat 2 Caps_Lock
View gist:198db6346476c8f339bad89cfc31ba53
Our PCI universe is right in-between CPU, memory, devices, etc.
And being specialised coming to write drivers for us, or to work on the PCI core is hard.
We just need to identify what to write about - some ideas:
- Basics, so things about PCI sub-system, how it works, how do we interact with others
- Common errors in design and things to avoid e.g., driver authoring pitfalls (with emphasis on PCI sub-system), sysfs in PCI, and so on
- Examples of good drivers and/or usage
- How we use things such as IOMMU, VFIO, PM in PCI, Hotplug, MSI/MSI-X, DMA, etc.
- Upcoming features: PCI-Express SIG (here not a lot of people has access to) and what's new there, upcoming new features, etc.