• F
    hw-breakpoints: Handle breakpoint weight in allocation constraints · f93a2054
    Frederic Weisbecker 提交于
    Depending on their nature and on what an arch supports, breakpoints
    may consume more than one address register. For example a simple
    absolute address match usually only requires one address register.
    But an address range match may consume two registers.
    
    Currently our slot allocation constraints, that tend to reflect the
    limited arch's resources, always consider that a breakpoint consumes
    one slot.
    
    Then provide a way for archs to tell us the weight of a breakpoint
    through a new hw_breakpoint_weight() helper. This weight will be
    computed against the generic allocation constraints instead of
    a constant value.
    Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
    Acked-by: NPaul Mundt <lethal@linux-sh.org>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Cc: K. Prasad <prasad@linux.vnet.ibm.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    f93a2054
hw_breakpoint.c 13.3 KB