Take a pan and dry roast the coconut on a medium to low flame. Keep aside.
Heat a pan with little coconut oil. Add half of the curry leaves and onion. Once the onion becomes pink add poppy seeds along with red chillies, mustard seeds, cumin seeds, cloves, cardamom, cinnamon, star anise, mace and coriander seeds. Roast all the ingredients.
Grind the roasted ingredients to a fine paste. Keep aside.
Heat coconut oil in another pan or pressure cooker and add curry leaves, ginger and garlic and for a few seconds.
Add the onions and fry it till it becomes brown in colour.
Add in turmeric powder and the chopped tomatoes and cook it till the tomatoes have turned soft.
Add the mutton pieces and stir, and cook until the mutton is almost 3/4th done.
Add in the potatoes and cook till the mutton and potatoes are completely cooked
Add the ground masala and cook it for a few minutes.
Add in the roasted coconut. Mix well and add the lime juice and coriander leaves.
Mix well and serve hot with parathas or steamed rice.