This application discloses novel pyrimidinyl pyridone derivatives according to formula I, wherein A, R1, R2, R3, and m are defined as described herein, which inhibit JNK. The compounds disclosed herein are useful to modulate the activity of JNK and treat diseases associated with excessive JNK activity. The compounds are useful to treat autoimmune, inflammatory, metabolic, and neurological diseases as well as cancer. Also disclosed are compositions comprising the compound of formula I and methods of treatment comprising administering a therapeutically effective amount of the compound of formula I to a subject in need thereof.