summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
AgeCommit message (Expand)Author
2013-07-14clocksource+irqchip: delete __cpuinit usage from all related filesPaul Gortmaker
2013-07-12Merge branch 'timers/clockevents' of git://git.linaro.org/people/dlezcano/clo...Thomas Gleixner
2013-07-06Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/ke...Linus Torvalds
2013-07-06Merge tag 'metag-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/...Linus Torvalds
2013-07-03Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds
2013-07-03clocksource: arm_global_timer: Add ARM global timer supportStuart Menefy
2013-07-02Merge tag 'late-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/a...Linus Torvalds
2013-07-02Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds
2013-07-02Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...Linus Torvalds
2013-07-02Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ar...Linus Torvalds
2013-07-02clocksource: Add Marvell Orion SoC timerSebastian Hesselbarth
2013-06-25clocksource: vf_pit_timer: Use linux/sched_clock.hFabio Estevam
2013-06-24clocksource: Add generic dummy timer driverMark Rutland
2013-06-21Merge tag 'v3.11-rockchip-basics' of git://git.kernel.org/pub/scm/linux/kerne...Arnd Bergmann
2013-06-20Merge tag 'zynq-dt-for-3.11' of git://git.xilinx.com/linux-xlnx into next/dtArnd Bergmann
2013-06-19clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE changeArnd Bergmann
2013-06-18Revert "dw_apb_timer_of.c: Remove parts that were picoxcell-specific"John Stultz
2013-06-19clocksource: exynos_mct: use (request/free)_irq calls for local timer registr...Chander Kashyap
2013-06-14Merge tag 'ux500-clksrc-for-arm-soc' of git://git.kernel.org/pub/scm/linux/ke...Olof Johansson
2013-06-13metag: log core and timer frequencies from arch codeJames Hogan
2013-06-12sched_clock: Make ARM's sched_clock generic for all architecturesStephen Boyd
2013-06-12clocksource: dw_apb_timer_of: use clocksource_of_initHeiko Stuebner
2013-06-12clocksource: dw_apb_timer_of: select DW_APB_TIMERHeiko Stuebner
2013-06-12clocksource: dw_apb_timer_of: add clock-handlingHeiko Stuebner
2013-06-12clocksource: dw_apb_timer_of: enable the use the clocksource as sched clockHeiko Stuebner
2013-06-08Merge branch 'timers/clockevents' of git://git.linaro.org/people/dlezcano/clo...Thomas Gleixner
2013-06-07clocksource: arch_timer: use virtual countersMark Rutland
2013-06-06clocksource: Add TI-Nspire timer supportDaniel Tang
2013-06-06clocksource: Add Freescale Vybrid pit timer supportJingchang Lu
2013-06-06clocksource: dw_apb: Fix error checkBaruch Siach
2013-05-31ARM: nomadik: fix clocksource warningArnd Bergmann
2013-05-28clocksource: dw_apb: Remove unused headerBaruch Siach
2013-05-28dw_apb_timer_of.c: Remove parts that were picoxcell-specificPavel Machek
2013-05-27clocksource: dbx500-prcmu: comment cleanupFabio Baltieri
2013-05-27clocksource: dbx500-prcmu: use relaxed readl variantRabin Vincent
2013-05-27arm: zynq: Migrate platform to clock controllerSoren Brinkmann
2013-05-16clocksource: apb_timer: Remove unsused functionThomas Gleixner
2013-05-12clocksource: nomadik-mtu: support of probeRabin Vincent
2013-05-07Merge tag 'multiplatform-for-linus-2' of git://git.kernel.org/pub/scm/linux/k...Linus Torvalds
2013-05-07Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/...Linus Torvalds
2013-05-06Merge branch 'exynos/pwm-clocksource' into late/multiplatformArnd Bergmann
2013-05-04Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds
2013-05-02Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/ker...Linus Torvalds
2013-05-02Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds
2013-04-30Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/ke...Linus Torvalds
2013-04-28clocksource: samsung_pwm_timer: Work around rounding errors in clockevents coreTomasz Figa
2013-04-28clocksource: samsung_pwm_timer: Correct programming of clock eventsTomasz Figa
2013-04-28clocksource: samsung_pwm_timer: Use proper clockevents max_deltaTomasz Figa
2013-04-28clocksource: samsung_pwm_timer: Add support for non-DT platformsTomasz Figa
2013-04-28clocksource: samsung_pwm_timer: Keep all driver data in a structureTomasz Figa
;pxor (@C[2],@C[4]);
+ &pxor (@C[2],@T[2]);
+ &movq (&QWP(@D[3],"esp"),@C[2]); # D[3] = C[2] = ROL64(C[4], 1) ^ C[2];
+
+ ######################################### first Rho step is special
+ &movq (@C[3],&QWP($A[3][3],"esi"));
+ &pxor (@C[3],@C[2]);
+ &movq (@T[2],@C[3]);
+ &psrlq (@C[3],64-$rhotates[3][3]);
+ &psllq (@T[2],$rhotates[3][3]);
+ &por (@C[3],@T[2]); # C[3] = ROL64(A[3][3] ^ C[2], rhotates[3][3]); /* D[3] */
+
+ &movq (@C[4],&QWP($A[4][4],"esi"));
+ &pxor (@C[4],@T[1]);
+ &movq (@T[2],@C[4]);
+ &psrlq (@C[4],64-$rhotates[4][4]);
+ &psllq (@T[2],$rhotates[4][4]);
+ &por (@C[4],@T[2]); # C[4] = ROL64(A[4][4] ^ E[1], rhotates[4][4]); /* D[4] */
+
+ &pxor (@C[0],&QWP($A[0][0],"esi")); # /* rotate by 0 */ /* D[0] */
+
+ &movq (@C[2],&QWP($A[2][2],"esi"));
+ &pxor (@C[2],@C[1]);
+ &movq (@T[1],@C[2]);
+ &psrlq (@C[2],64-$rhotates[2][2]);
+ &psllq (@T[1],$rhotates[2][2]);
+ &por (@C[2],@T[1]); # C[2] = ROL64(A[2][2] ^ C[1], rhotates[2][2]); /* D[2] */
+
+ &movq (@C[1],&QWP($A[1][1],"esi"));
+ &pxor (@C[1],@T[0]);
+ &movq (@T[2],@C[1]);
+ &psrlq (@C[1],64-$rhotates[1][1]);
+ &psllq (@T[2],$rhotates[1][1]);
+ &por (@C[1],@T[2]); # C[1] = ROL64(A[1][1] ^ E[0], rhotates[1][1]); /* D[1] */
+
+sub Chi() { ######### regular Chi step
+ my $y = shift;
+
+ &movq (@T[0],@C[1]);
+ &pandn (@T[0],@C[2]);
+ &pxor (@T[0],@C[0]);
+ &pxor (@T[0],&QWP(0,"ebx")) if ($y == 0);
+ &lea ("ebx",&DWP(8,"ebx")) if ($y == 0);
+ &movq (&QWP($A[$y][0],"edi"),@T[0]); # R[0][0] = C[0] ^ (~C[1] & C[2]) ^ iotas[i];
+
+ &movq (@T[1],@C[2]);
+ &pandn (@T[1],@C[3]);
+ &pxor (@T[1],@C[1]);
+ &movq (&QWP($A[$y][1],"edi"),@T[1]); # R[0][1] = C[1] ^ (~C[2] & C[3]);
+
+ &movq (@T[2],@C[3]);
+ &pandn (@T[2],@C[4]);
+ &pxor (@T[2],@C[2]);
+ &movq (&QWP($A[$y][2],"edi"),@T[2]); # R[0][2] = C[2] ^ (~C[3] & C[4]);
+
+ &movq (@T[0],@C[4]);
+ &pandn (@T[0],@C[0]);
+ &pxor (@T[0],@C[3]);
+ &movq (&QWP($A[$y][3],"edi"),@T[0]); # R[0][3] = C[3] ^ (~C[4] & C[0]);
+
+ &movq (@T[1],@C[0]);
+ &pandn (@T[1],@C[1]);
+ &pxor (@T[1],@C[4]);
+ &movq (&QWP($A[$y][4],"edi"),@T[1]); # R[0][4] = C[4] ^ (~C[0] & C[1]);
+}
+ &Chi (0);
+
+sub Rho() { ######### regular Rho step
+ my $x = shift;
+
+ &movq (@C[0],&QWP($A[0][$x],"esi"));
+ &pxor (@C[0],&QWP(@D[$x],"esp"));
+ &movq (@T[0],@C[0]);
+ &psrlq (@C[0],64-$rhotates[0][$x]);
+ &psllq (@T[0],$rhotates[0][$x]);
+ &por (@C[0],@T[0]); # C[0] = ROL64(A[0][3] ^ D[3], rhotates[0][3]);
+
+ &movq (@C[1],&QWP($A[1][($x+1)%5],"esi"));
+ &pxor (@C[1],&QWP(@D[($x+1)%5],"esp"));
+ &movq (@T[1],@C[1]);
+ &psrlq (@C[1],64-$rhotates[1][($x+1)%5]);
+ &psllq (@T[1],$rhotates[1][($x+1)%5]);
+ &por (@C[1],@T[1]); # C[1] = ROL64(A[1][4] ^ D[4], rhotates[1][4]);
+
+ &movq (@C[2],&QWP($A[2][($x+2)%5],"esi"));
+ &pxor (@C[2],&QWP(@D[($x+2)%5],"esp"));
+ &movq (@T[2],@C[2]);
+ &psrlq (@C[2],64-$rhotates[2][($x+2)%5]);
+ &psllq (@T[2],$rhotates[2][($x+2)%5]);
+ &por (@C[2],@T[2]); # C[2] = ROL64(A[2][0] ^ D[0], rhotates[2][0]);
+
+ &movq (@C[3],&QWP($A[3][($x+3)%5],"esi"));
+ &pxor (@C[3],&QWP(@D[($x+3)%5],"esp"));
+ &movq (@T[0],@C[3]);
+ &psrlq (@C[3],64-$rhotates[3][($x+3)%5]);
+ &psllq (@T[0],$rhotates[3][($x+3)%5]);
+ &por (@C[3],@T[0]); # C[3] = ROL64(A[3][1] ^ D[1], rhotates[3][1]);
+
+ &movq (@C[4],&QWP($A[4][($x+4)%5],"esi"));
+ &pxor (@C[4],&QWP(@D[($x+4)%5],"esp"));
+ &movq (@T[1],@C[4]);
+ &psrlq (@C[4],64-$rhotates[4][($x+4)%5]);
+ &psllq (@T[1],$rhotates[4][($x+4)%5]);
+ &por (@C[4],@T[1]); # C[4] = ROL64(A[4][2] ^ D[2], rhotates[4][2]);
+}
+ &Rho (3); &Chi (1);
+ &Rho (1); &Chi (2);
+ &Rho (4); &Chi (3);
+ &Rho (2); #&Chi (4);
+
+ &movq (@T[0],@C[0]); ######### last Chi(4) is special
+ &movq (&QWP(@D[1],"esp"),@C[1]);
+
+ &movq (@T[1],@C[1]);
+ &pandn (@T[1],@C[2]);
+ &pxor (@C[0],@T[1]);
+ &movq (&QWP($A[4][0],"edi"),@C[0]); # R[4][0] = C[0] ^= (~C[1] & C[2]);
+
+ &movq (@T[2],@C[2]);
+ &pandn (@T[2],@C[3]);
+ &pxor (@C[1],@T[2]);
+ &movq (&QWP($A[4][1],"edi"),@C[1]); # R[4][1] = C[1] ^= (~C[2] & C[3]);
+
+ &movq (@T[1],@C[3]);
+ &pandn (@T[1],@C[4]);
+ &pxor (@C[2],@T[1]);
+ &movq (&QWP($A[4][2],"edi"),@C[2]); # R[4][2] = C[2] ^= (~C[3] & C[4]);
+
+ &movq (@T[2],@C[4]);
+ &pandn (@T[2],@T[0]);
+ &pxor (@C[3],@T[2]);
+ &movq (&QWP($A[4][3],"edi"),@C[3]); # R[4][3] = C[3] ^= (~C[4] & D[0]);
+
+ &pandn (@T[0],&QWP(@D[1],"esp"));
+ &pxor (@C[4],@T[0]);
+ &movq (&QWP($A[4][4],"edi"),@C[4]); # R[4][4] = C[4] ^= (~D[0] & D[1]);
+
+ &xchg ("esi","edi");
+ &dec ("ecx");
+ &jnz (&label("loop"));
+
+ &lea ("ebx",&DWP(-192,"ebx")); # rewind iotas
+ &ret ();
+&function_end_B("_KeccakF1600");
+
+&function_begin("KeccakF1600");
+ &mov ("esi",&wparam(0));
+ &mov ("ebp","esp");
+ &sub ("esp",240);
+ &call (&label("pic_point"));
+ &set_label("pic_point");
+ &blindpop("ebx");
+ &lea ("ebx",&DWP(&label("iotas")."-".&label("pic_point"),"ebx"));
+ &and ("esp",-8);
+ &lea ("esi",&DWP(100,"esi")); # size optimization
+ &lea ("edi",&DWP(8*5+100,"esp")); # size optimization
+
+ &call ("_KeccakF1600");
+
+ &mov ("esp","ebp");
+ &emms ();
+&function_end("KeccakF1600");
+
+&function_begin("SHA3_absorb");
+ &mov ("esi",&wparam(0)); # A[][]
+ &mov ("eax",&wparam(1)); # inp
+ &mov ("ecx",&wparam(2)); # len
+ &mov ("edx",&wparam(3)); # bsz
+ &mov ("ebp","esp");
+ &sub ("esp",240+8);
+ &call (&label("pic_point"));
+ &set_label("pic_point");
+ &blindpop("ebx");
+ &lea ("ebx",&DWP(&label("iotas")."-".&label("pic_point"),"ebx"));
+ &and ("esp",-8);
+
+ &mov ("edi","esi");
+ &lea ("esi",&DWP(100,"esi")); # size optimization
+ &mov (&DWP(-4,"ebp"),"edx"); # save bsz
+ &jmp (&label("loop"));
+
+&set_label("loop",16);
+ &cmp ("ecx","edx"); # len < bsz?
+ &jc (&label("absorbed"));
+
+ &shr ("edx",3); # bsz /= 8
+&set_label("block");
+ &movq ("mm0",&QWP(0,"eax"));
+ &lea ("eax",&DWP(8,"eax"));
+ &pxor ("mm0",&QWP(0,"edi"));
+ &lea ("edi",&DWP(8,"edi"));
+ &sub ("ecx",8); # len -= 8
+ &movq (&QWP(-8,"edi"),"mm0");
+ &dec ("edx"); # bsz--
+ &jnz (&label("block"));
+
+ &lea ("edi",&DWP(8*5+100,"esp")); # size optimization
+ &mov (&DWP(-8,"ebp"),"ecx"); # save len
+ &call ("_KeccakF1600");
+ &mov ("ecx",&DWP(-8,"ebp")); # pull len
+ &mov ("edx",&DWP(-4,"ebp")); # pull bsz
+ &lea ("edi",&DWP(-100,"esi"));
+ &jmp (&label("loop"));
+
+&set_label("absorbed",16);
+ &mov ("eax","ecx"); # return value
+ &mov ("esp","ebp");
+ &emms ();
+&function_end("SHA3_absorb");
+
+&function_begin("SHA3_squeeze");
+ &mov ("esi",&wparam(0)); # A[][]
+ &mov ("eax",&wparam(1)); # out
+ &mov ("ecx",&wparam(2)); # len
+ &mov ("edx",&wparam(3)); # bsz
+ &mov ("ebp","esp");
+ &sub ("esp",240+8);
+ &call (&label("pic_point"));
+ &set_label("pic_point");
+ &blindpop("ebx");
+ &lea ("ebx",&DWP(&label("iotas")."-".&label("pic_point"),"ebx"));
+ &and ("esp",-8);
+
+ &shr ("edx",3); # bsz /= 8
+ &mov ("edi","esi");
+ &lea ("esi",&DWP(100,"esi")); # size optimization
+ &mov (&DWP(-4,"ebp"),"edx"); # save bsz
+ &jmp (&label("loop"));
+
+&set_label("loop",16);
+ &cmp ("ecx",8); # len < 8?
+ &jc (&label("tail"));
+
+ &movq ("mm0",&QWP(0,"edi"));
+ &lea ("edi",&DWP(8,"edi"));
+ &movq (&QWP(0,"eax"),"mm0");
+ &lea ("eax",&DWP(8,"eax"));
+ &sub ("ecx",8); # len -= 8
+ &jz (&label("done"));
+
+ &dec ("edx"); # bsz--
+ &jnz (&label("loop"));
+
+ &lea ("edi",&DWP(8*5+100,"esp")); # size optimization
+ &mov (&DWP(-8,"ebp"),"ecx"); # save len
+ &call ("_KeccakF1600");
+ &mov ("ecx",&DWP(-8,"ebp")); # pull len
+ &mov ("edx",&DWP(-4,"ebp")); # pull bsz
+ &lea ("edi",&DWP(-100,"esi"));
+ &jmp (&label("loop"));
+
+&set_label("tail",16);
+ &mov ("esi","edi");
+ &mov ("edi","eax");
+ &data_word("0xA4F39066"); # rep movsb
+
+&set_label("done");
+ &mov ("esp","ebp");
+ &emms ();
+&function_end("SHA3_squeeze");
+
+&set_label("iotas",32);
+ &data_word(0x00000001,0x00000000);
+ &data_word(0x00008082,0x00000000);
+ &data_word(0x0000808a,0x80000000);
+ &data_word(0x80008000,0x80000000);
+ &data_word(0x0000808b,0x00000000);
+ &data_word(0x80000001,0x00000000);
+ &data_word(0x80008081,0x80000000);
+ &data_word(0x00008009,0x80000000);
+ &data_word(0x0000008a,0x00000000);
+ &data_word(0x00000088,0x00000000);
+ &data_word(0x80008009,0x00000000);
+ &data_word(0x8000000a,0x00000000);
+ &data_word(0x8000808b,0x00000000);
+ &data_word(0x0000008b,0x80000000);
+ &data_word(0x00008089,0x80000000);
+ &data_word(0x00008003,0x80000000);
+ &data_word(0x00008002,0x80000000);
+ &data_word(0x00000080,0x80000000);
+ &data_word(0x0000800a,0x00000000);
+ &data_word(0x8000000a,0x80000000);
+ &data_word(0x80008081,0x80000000);
+ &data_word(0x00008080,0x80000000);
+ &data_word(0x80000001,0x00000000);
+ &data_word(0x80008008,0x80000000);
+&asciz("Keccak-1600 absorb and squeeze for MMX, CRYPTOGAMS by <appro\@openssl.org>");
+
+&asm_finish();
+
+close STDOUT;