I'm a total layman in these matters, but I find it very strange that HMRC has overly defined residential property in this legislation, with its every-which-way dwelling-house stuff, compared with its stance for the purposes of SDLT, where it merely states 'residential' (presumably for dwelling-houses) or 'non-residential' (for mixed transactions) - so there's no additional 3% penalty when buying shops with flats.
Also, I've just watched a piece by Olivia Rudgard of The Telegraph called 'Buy-to-let stamp duty loophole: flats above shops' where she states "Mortgage interest relief changes won't apply to mixed-use property".
The following is copied from LEGISLATION.GOV.UK - Finance (No. 2) Act 2015
272B Meaning of “costs of a dwelling-related loan”
(1)Subsections (2) to (5) apply for the purposes of section 272A.
(2)“Dwelling-related loan”, in relation to a property business, means so much of an amount borrowed for purposes of the business as is referable (on a just and reasonable apportionment) to so much of the business as is carried on for the purpose of generating income from—
(a)land consisting of a dwelling-house or part of a dwelling-house, or
(b)an estate, interest or right in or over land within paragraph (a),
but see subsections (3) and (4).
(3)Anything that in the course of a property business is done for creating (by construction or adaptation) a dwelling-house, or part of a dwelling-house, from which income is to be generated is, for the purposes of subsection (2), to be treated as done for the purpose mentioned in that subsection.
(4)An amount borrowed for purposes of a property business is not a dwelling-related loan so far as the amount is referable (on a just and reasonable apportionment) to so much of the property business as consists of the commercial letting of furnished holiday accommodation.