There are many cards that affect attacking creatures, and either limit what they can attack or assess a cost when they do. For example, Ghostly Prison requires that the controller of any creature attacking the controller of the Prison to pay 2 generic mana. However, Ghostly Prison does not affect any creature that attacks a planeswalker controlled by this same player. This is mostly because Ghostly Prison was printed before planesalkers were introduced.
Compare this to Norn’s Annex. Norn’s Annex specific creates a restriction where creatures cannot attack the controller of the Annex OR any planesalkers that player controls unless one white mana or two life is paid for each attacking creature. It is important to note this distinction as there are many older cards that affect what happens when a player is attacked that do not apply when a planeswalker is attacked.