First of all, if the assembler is in 64-bit mode, you need to use 64-bit
registers (i.e. %%rax) in all MOV'es between a register and a CR.
Second, you're doing something wrong. This code enables paging. That
means that coming into this code, the CPU is in 32-bit mode. However,
since you build with 64-bit GCC, your assembler generates 64-bit code by
default. Also, any compiled C code (which I assume exists before and
after this __asm__ statement) produces 64-bit code. The two modes are
not binary compatible, you can't do that.
If you want the rest of your kernel.c to produce 64-bit code, you should
move the "enable paging" code into a separate file, either purely
assembler or C containing 32-bit code. Then build it with "gcc -m32" --
that switches GCC to generating 32-bit code.
If you want your kernel.c to produce 32-bit code, then just add -m32 to
GCC options when building that file. That should make the above
statement build without errors.