You can apply for permanent residence in the UK by adding time spent under the HSMP to time spent under other categories

The Home Office has confirmed that any time spent in the United Kingdom under a category that leads to settlement; eg work permit, UK ancestry, etc can be added to time spent under the Highly Skilled Migrant Programme in applications for Indefinite Leave to Remain (permanent residence).

Previously, the Home Office had stated that time spent under the Highly Skilled Migrant Programme could not be added to time spent as eg a work permit holder. Once an application for permission to stay under the Highly Skilled Migrant Programme was granted - the 4 year qualify period for permanent residence started all over again. Indeed, the Immigration Rules are clear - the applicant must have spent 4 continuous years in the United Kingdom in one category in order to apply for permanent residence.

However, the Home Office appears to have made a concession for Highly Skilled Migrants - perhaps as a way of encouraging people of a relatively high net worth to stay in the UK.

Therefore any time you have spent in the UK as a work permit holder can be added to time spent as a Highly Skilled Migrant. Applications can be made a month before that 4 year period is completed.