Place the potato dice in a soup pot and cover with the stock or water. Bring to a simmer, then simmer gently, covered, until the potatoes are just tender, about 15 minutes.

In the meantime, heat the oil in a small skillet. Sauté the onion over medium heat until translucent. Add the garlic and green pepper and sauté until the mixture begins to brown lightly.

Remove half of the potatoes from their cooking liquid with a slotted spoon and place them in a shallow bowl. Mash them well, then stir back into the soup pot, followed by the onion-bell pepper mixture. Add the tomatoes, corn, green chilies, and chili powder. Add additional water if the soup is too dense. Stir together, return to a simmer, then simmer gently for 20 minutes.

Sprinkle in the grated cheese, a little at a time, stirring it until it is fairly well melted each time. Season with salt and pepper and simmer over very low heat, stirring frequently, for another 5 minutes.

Serve at once, or let stand for an hour or so before serving. Heat through as needed and adjust the consistency with more water if the soup becomes too thick.